class Lingo::Language::WordForm
Attributes
attr[RW]
form[RW]
gender[RW]
head[RW]
src[RW]
token[RW]
Public Class Methods
new(form, attr = WA_UNSET, src = nil)
click to toggle source
# File lib/lingo/language/word_form.rb, line 40 def initialize(form, attr = WA_UNSET, src = nil) attr, @gender = attr @form, @attr, @src = form || '', attr || '', src end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/lingo/language/word_form.rb, line 59 def <=>(other) other.nil? ? 1 : to_a <=> other.to_a end
eql?(other)
click to toggle source
# File lib/lingo/language/word_form.rb, line 79 def eql?(other) self.class.equal?(other.class) && (self <=> other) == 0 end
Also aliased as: ==
hash()
click to toggle source
# File lib/lingo/language/word_form.rb, line 75 def hash to_a.hash end
identified?()
click to toggle source
# File lib/lingo/language/word_form.rb, line 51 def identified? attr == WA_IDENTIFIED end
inspect()
click to toggle source
# File lib/lingo/language/word_form.rb, line 71 def inspect to_s end
to_a()
click to toggle source
# File lib/lingo/language/word_form.rb, line 63 def to_a [form, attr, gender] end
to_s()
click to toggle source
# File lib/lingo/language/word_form.rb, line 67 def to_s to_a.compact.join('/') end
unknown?()
click to toggle source
# File lib/lingo/language/word_form.rb, line 47 def unknown? [WA_UNKNOWN, WA_UNKMULPART].include?(attr) end
word_token?()
click to toggle source
# File lib/lingo/language/word_form.rb, line 55 def word_token? false end