lib/zenlish/lex/lexeme.rb in zenlish-0.2.05 vs lib/zenlish/lex/lexeme.rb in zenlish-0.2.06
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require_relative '../feature/feature_struct_def_bearer'
module Zenlish
module Lex
# A word in the abstract sense; an individual, distinct item of a lexicon
# that belongs to a word class and of which a number of actual word forms
@@ -18,11 +20,11 @@
@wclass = aWClass
@entry = anEntry.object_id
anEntry.add_lexeme(self)
if aWClass.kind_of?(WClasses::WordClass)
unless wclass.extension.nil?
- self.extend(wclass.extension)
+ extend(wclass.extension)
init_extension(self)
end
p_struct = aWClass.kind_of?(WClasses::WordClass) ? aWClass.struct : nil
overriding_struct_defs = aFeatureHash.nil? ? {} : aFeatureHash
init_struct_def(p_struct, overriding_struct_defs)
@@ -39,15 +41,15 @@
# @return [String] The word form (spelling) inflected to the given contraints.
def inflect(constraints)
table = paradigm
table.inflect(self, constraints)
end
-
+
def all_inflections
table = paradigm
table.all_inflections(self)
- end
+ end
# @return [String] the base (dictionary) form.
def lemma
entry.lemma
end
@@ -60,6 +62,6 @@
end
alias base_form lemma
end # class
end # module
-end # module
\ No newline at end of file
+end # module