Class: Eiwa::Tag::Meaning
Instance Attribute Summary collapse
-
#antonyms ⇒ Object
readonly
Returns the value of attribute antonyms.
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#cross_references ⇒ Object
readonly
Returns the value of attribute cross_references.
-
#definitions ⇒ Object
readonly
Returns the value of attribute definitions.
-
#dialects ⇒ Object
readonly
Returns the value of attribute dialects.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#misc_tags ⇒ Object
readonly
Returns the value of attribute misc_tags.
-
#parts_of_speech ⇒ Object
readonly
Returns the value of attribute parts_of_speech.
-
#restricted_to_readings ⇒ Object
readonly
Returns the value of attribute restricted_to_readings.
-
#restricted_to_spellings ⇒ Object
readonly
Returns the value of attribute restricted_to_spellings.
-
#source_languages ⇒ Object
readonly
Returns the value of attribute source_languages.
Attributes inherited from Any
#characters, #parent, #tag_name
Instance Method Summary collapse
- #end_child(child) ⇒ Object
-
#initialize ⇒ Meaning
constructor
A new instance of Meaning.
- #trickle_down(previous) ⇒ Object
Methods inherited from Any
#add_characters, #end_self, #start, #to_s
Constructor Details
#initialize ⇒ Meaning
Returns a new instance of Meaning.
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/eiwa/tag/meaning.rb', line 8 def initialize @parts_of_speech = [] @definitions = [] = [] @cross_references = [] @restricted_to_readings = [] @restricted_to_spellings = [] @antonyms = [] @fields = [] @source_languages = [] @dialects = [] @comments = [] end |
Instance Attribute Details
#antonyms ⇒ Object (readonly)
Returns the value of attribute antonyms.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def antonyms @antonyms end |
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def comments @comments end |
#cross_references ⇒ Object (readonly)
Returns the value of attribute cross_references.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def cross_references @cross_references end |
#definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def definitions @definitions end |
#dialects ⇒ Object (readonly)
Returns the value of attribute dialects.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def dialects @dialects end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def fields @fields end |
#misc_tags ⇒ Object (readonly)
Returns the value of attribute misc_tags.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def end |
#parts_of_speech ⇒ Object (readonly)
Returns the value of attribute parts_of_speech.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def parts_of_speech @parts_of_speech end |
#restricted_to_readings ⇒ Object (readonly)
Returns the value of attribute restricted_to_readings.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def restricted_to_readings @restricted_to_readings end |
#restricted_to_spellings ⇒ Object (readonly)
Returns the value of attribute restricted_to_spellings.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def restricted_to_spellings @restricted_to_spellings end |
#source_languages ⇒ Object (readonly)
Returns the value of attribute source_languages.
4 5 6 |
# File 'lib/eiwa/tag/meaning.rb', line 4 def source_languages @source_languages end |
Instance Method Details
#end_child(child) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/eiwa/tag/meaning.rb', line 22 def end_child(child) case child.tag_name when "pos" @parts_of_speech << child when "gloss" @definitions << child when "misc" << child when "field" @fields << child when "xref" @cross_references << child when "ant" @antonyms << child when "stagr" @restricted_to_readings << child.characters when "stagk" @restricted_to_spellings << child.characters when "lsource" @source_languages << child when "dial" @dialects << child when "s_inf" @comments << child.characters end end |
#trickle_down(previous) ⇒ Object
49 50 51 52 |
# File 'lib/eiwa/tag/meaning.rb', line 49 def trickle_down(previous) @parts_of_speech = previous.parts_of_speech if @parts_of_speech.empty? = previous. if .empty? end |