class Linguistics::Latin::Verb::TenseBlock

Attributes

meaning[R]
results[R]

Public Class Methods

json_create(o) click to toggle source
# File lib/linguistics_latin_tense_block/tense_block.rb, line 46
def TenseBlock.json_create(o)
 new(o['data'])
end
new(r, opts={}) click to toggle source
# File lib/linguistics_latin_tense_block/tense_block.rb, line 25
def initialize(r, opts={})
  @results = Array(r).map{ |v| fix_macrons(v) }
  @meaning = opts[:meaning] || ""
  @resolver = VectorResolutionDelegate.new(@results)
end

Public Instance Methods

to_json(*a) click to toggle source
# File lib/linguistics_latin_tense_block/tense_block.rb, line 39
def to_json(*a)
  {
    'json_class'   => self.class.name,
    'data'         => @results.map{|i| i.to_json}
  }.to_json(*a)
end
to_s() click to toggle source
# File lib/linguistics_latin_tense_block/tense_block.rb, line 31
def to_s
  to_a.to_s
end
wordless?() click to toggle source
# File lib/linguistics_latin_tense_block/tense_block.rb, line 35
def wordless?
  !@results.find{ |r| r =~ /\w/ }
end