Class: Chordpro::Directive::Name
- Inherits:
-
Object
- Object
- Chordpro::Directive::Name
- Defined in:
- lib/chordpro/directive.rb
Instance Attribute Summary collapse
-
#aka ⇒ Object
readonly
Returns the value of attribute aka.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name, aka: nil, meta: false) ⇒ Name
constructor
A new instance of Name.
- #to_s ⇒ Object
Constructor Details
#initialize(name, aka: nil, meta: false) ⇒ Name
Returns a new instance of Name.
6 7 8 |
# File 'lib/chordpro/directive.rb', line 6 def initialize(name, aka: nil, meta: false) @name, @aka, @meta = name, aka, end |
Instance Attribute Details
#aka ⇒ Object (readonly)
Returns the value of attribute aka.
4 5 6 |
# File 'lib/chordpro/directive.rb', line 4 def aka @aka end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
4 5 6 |
# File 'lib/chordpro/directive.rb', line 4 def @meta end |
Instance Method Details
#==(other) ⇒ Object
14 15 16 |
# File 'lib/chordpro/directive.rb', line 14 def ==(other) to_s == other.to_s || (aka && aka == other.to_s) end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/chordpro/directive.rb', line 10 def to_s @name end |