class Eiwa::Tag::Definition
Attributes
gender[R]
language[R]
text[R]
type[R]
Public Class Methods
new(text: nil, language: "eng", gender: nil, type: nil)
click to toggle source
# File lib/eiwa/tag/definition.rb, line 6 def initialize(text: nil, language: "eng", gender: nil, type: nil) @text = text @language = language @gender = gender @type = type end
Public Instance Methods
end_self()
click to toggle source
# File lib/eiwa/tag/definition.rb, line 13 def end_self @text = @characters @language = @attrs["xml:lang"] @gender = @attrs["g_gend"] @type = @attrs["g_type"] end
eql?(other)
click to toggle source
# File lib/eiwa/tag/definition.rb, line 32 def eql?(other) @text == other.text && @language == other.language && @gender == other.gender && @type == other.type end
Also aliased as: ==
explanation?()
click to toggle source
# File lib/eiwa/tag/definition.rb, line 28 def explanation? @type == "expl" end
figurative?()
click to toggle source
# File lib/eiwa/tag/definition.rb, line 24 def figurative? @type == "fig" end
hash()
click to toggle source
# File lib/eiwa/tag/definition.rb, line 40 def hash @text.hash + @language.hash + @gender.hash + @type.hash end
literal?()
click to toggle source
# File lib/eiwa/tag/definition.rb, line 20 def literal? @type == "lit" end