class IniParse::Lines::BlankOption

Attributes

key[RW]
value[RW]

Public Class Methods

new(key, value = nil, opts = {}) click to toggle source

Parameters

key<String>

The option key.

value<String>

The value for this option.

opts<Hash>

Extra options for the line.

Calls superclass method IniParse::Lines::Line::new
# File lib/tungsten/iniparse.rb, line 19
def initialize(key, value = nil, opts = {})
  super(opts)
  @key, @value = nil, value
end
parse(line, opts) click to toggle source
# File lib/tungsten/iniparse.rb, line 24
def self.parse(line, opts)
  if m = @regex.match(line)
    [:option, m[1].strip, nil, opts]
  end
end

Private Instance Methods

line_contents() click to toggle source
# File lib/tungsten/iniparse.rb, line 34
def line_contents
  '%s' % [key]
end