Class: Brigit::ConfigParser::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/brigit/config_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Section

Returns a new instance of Section.



10
11
12
# File 'lib/brigit/config_parser.rb', line 10

def initialize(name)
  @name = name
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &block) ⇒ Object



18
19
20
# File 'lib/brigit/config_parser.rb', line 18

def method_missing(*args, &block)
  options.__send__(*args, &block)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/brigit/config_parser.rb', line 9

def name
  @name
end

Instance Method Details

#optionsObject



14
15
16
# File 'lib/brigit/config_parser.rb', line 14

def options
  @options ||= {}
end