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 41
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 60
def <=>(other)
  other.nil? ? 1 : to_a <=> other.to_a
end
==(other)
Alias for: eql?
eql?(other) click to toggle source
# File lib/lingo/language/word_form.rb, line 80
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 76
def hash
  to_a.hash
end
identified?() click to toggle source
# File lib/lingo/language/word_form.rb, line 52
def identified?
  attr == WA_IDENTIFIED
end
inspect() click to toggle source
# File lib/lingo/language/word_form.rb, line 72
def inspect
  to_s
end
to_a() click to toggle source
# File lib/lingo/language/word_form.rb, line 64
def to_a
  [form, attr, gender]
end
to_s() click to toggle source
# File lib/lingo/language/word_form.rb, line 68
def to_s
  to_a.compact.join('/')
end
unknown?() click to toggle source
# File lib/lingo/language/word_form.rb, line 48
def unknown?
  [WA_UNKNOWN, WA_UNKMULPART].include?(attr)
end
word_token?() click to toggle source
# File lib/lingo/language/word_form.rb, line 56
def word_token?
  false
end