Method: Pericope.parse
- Defined in:
- lib/pericope.rb
.parse(text) ⇒ Object
77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/pericope.rb', line 77 def self.parse(text) pericopes = [] match_all(text) do |attributes| pericope = Pericope.new(attributes) if block_given? yield pericope else pericopes << pericope end end block_given? ? text : pericopes end |