class Eiwa::Tag::Entry
Attributes
id[R]
meanings[R]
readings[R]
spellings[R]
Public Class Methods
new()
click to toggle source
# File lib/eiwa/tag/entry.rb, line 6 def initialize @spellings = [] @readings = [] @meanings = [] end
Public Instance Methods
end_child(child)
click to toggle source
# File lib/eiwa/tag/entry.rb, line 16 def end_child(child) case child.tag_name when "ent_seq" @id = child.characters.to_i when "k_ele" @spellings << child when "r_ele" @readings << child when "sense" child.trickle_down(@meanings.last) unless @meanings.last.nil? @meanings << child end end
text()
click to toggle source
# File lib/eiwa/tag/entry.rb, line 12 def text (@spellings + @readings).first.text end