Class: Chordpro::Lyric

Inherits:
Struct
  • Object
show all
Defined in:
lib/chordpro/lyric.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



2
3
4
# File 'lib/chordpro/lyric.rb', line 2

def text
  @text
end

Instance Method Details

#accept(visitor) ⇒ Object



7
8
9
# File 'lib/chordpro/lyric.rb', line 7

def accept(visitor)
  visitor.respond_to?(:lyric) ? visitor.lyric(self) : self
end

#to_sObject



3
4
5
# File 'lib/chordpro/lyric.rb', line 3

def to_s
  text
end