lib/dotini/key_value_pair.rb
# Represents the key/value pair as a string
Represents the key/value pair as a string
Represents the key / value pair as a string
def to_s
      buffer = StringIO.new
      prepended_comments.each do |line|
        buffer << line << "\n"
      end
      unless key.nil?
        buffer << "#{key} = #{value}"
        buffer <<
          if inline_comment.nil?
            "\n"
          else
            " #{inline_comment}\n"
          end
      end
      buffer.string
    end
def to_s buffer = StringIO . new prepended_comments . each do | line | buffer << line << "\n" end unless key . nil? buffer << "#{key} = #{value}" buffer << if inline_comment . nil? "\n" else " #{inline_comment}\n" end end buffer . string end
Represents the key/value pair as a string
Represents the key / value pair as a string