Class: ScribeDown::Section
- Inherits:
-
Object
- Object
- ScribeDown::Section
- Defined in:
- lib/section.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Section
constructor
A new instance of Section.
- #method_missing(method) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Section
Returns a new instance of Section.
5 6 7 |
# File 'lib/section.rb', line 5 def initialize(={}) self. = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/section.rb', line 13 def method_missing(method) if .has_key?(method.to_sym) return self.[method.to_sym] elsif .has_key?(method.to_s) return self.[method.to_s] else super.method_missing(method) end end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/section.rb', line 3 def end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/section.rb', line 9 def to_s "(#{path}: #{options})" end |