Class: Chordpro::Line
- Inherits:
-
Struct
- Object
- Struct
- Chordpro::Line
- Includes:
- Enumerable
- Defined in:
- lib/chordpro/line.rb
Instance Attribute Summary collapse
-
#parts ⇒ Object
Returns the value of attribute parts.
Instance Method Summary collapse
Instance Attribute Details
#parts ⇒ Object
Returns the value of attribute parts
2 3 4 |
# File 'lib/chordpro/line.rb', line 2 def parts @parts end |
Instance Method Details
#accept(visitor) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/chordpro/line.rb', line 9 def accept(visitor) parts = map { |part| part.accept(visitor) } if visitor.respond_to?(:line) visitor.line(self, parts) else Line.new(parts) end end |
#each(&block) ⇒ Object
5 6 7 |
# File 'lib/chordpro/line.rb', line 5 def each(&block) parts.each(&block) end |