Class: Chordpro::Directive
- Inherits:
-
Struct
- Object
- Struct
- Chordpro::Directive
- Defined in:
- lib/chordpro/directive.rb
Defined Under Namespace
Classes: Name
Constant Summary collapse
- BY_NAME =
{}
- BY_ALIAS =
{}
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
2 3 4 |
# File 'lib/chordpro/directive.rb', line 2 def name @name end |
#value ⇒ Object
Returns the value of attribute value
2 3 4 |
# File 'lib/chordpro/directive.rb', line 2 def value @value end |
Class Method Details
Instance Method Details
#accept(visitor) ⇒ Object
33 34 35 |
# File 'lib/chordpro/directive.rb', line 33 def accept(visitor) visitor.respond_to?(name.to_s) ? visitor.send(name.to_s, value) : self end |