Class: Pslm::Psalm::VersePart

Inherits:
Object
  • Object
show all
Defined in:
lib/pslm/psalm.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(words, src, pos) ⇒ VersePart

Returns a new instance of VersePart.



93
94
95
96
97
# File 'lib/pslm/psalm.rb', line 93

def initialize(words, src, pos)
  @words = words
  @src = src
  @pos = pos
end

Instance Attribute Details

#posObject (readonly)

position in the verse - one of :flex, :first, :second



106
107
108
# File 'lib/pslm/psalm.rb', line 106

def pos
  @pos
end

#srcObject (readonly)

the source text before parsing



103
104
105
# File 'lib/pslm/psalm.rb', line 103

def src
  @src
end

#wordsObject (readonly)

Array of Words



100
101
102
# File 'lib/pslm/psalm.rb', line 100

def words
  @words
end

Instance Method Details

#==(p2) ⇒ Object



108
109
110
# File 'lib/pslm/psalm.rb', line 108

def ==(p2)
  p2.is_a?(VersePart) && self.words == p2.words
end