Class: Zenlish::Lex::LexicalEntry
- Inherits:
-
Object
- Object
- Zenlish::Lex::LexicalEntry
- Defined in:
- lib/zenlish/lex/lexical_entry.rb
Overview
TODO: document
Instance Attribute Summary collapse
-
#lemma ⇒ Object
readonly
Returns the value of attribute lemma.
-
#lexemes ⇒ Object
readonly
Returns the value of attribute lexemes.
Instance Method Summary collapse
- #add_lexeme(aLexeme) ⇒ Object
-
#initialize(theLemma, aLexeme = nil) ⇒ LexicalEntry
constructor
A new instance of LexicalEntry.
Constructor Details
#initialize(theLemma, aLexeme = nil) ⇒ LexicalEntry
Returns a new instance of LexicalEntry.
8 9 10 11 12 |
# File 'lib/zenlish/lex/lexical_entry.rb', line 8 def initialize(theLemma, aLexeme = nil) @lemma = theLemma.dup @lexemes = [] add_lexeme(aLexeme) end |
Instance Attribute Details
#lemma ⇒ Object (readonly)
Returns the value of attribute lemma.
5 6 7 |
# File 'lib/zenlish/lex/lexical_entry.rb', line 5 def lemma @lemma end |
#lexemes ⇒ Object (readonly)
Returns the value of attribute lexemes.
6 7 8 |
# File 'lib/zenlish/lex/lexical_entry.rb', line 6 def lexemes @lexemes end |
Instance Method Details
#add_lexeme(aLexeme) ⇒ Object
14 15 16 |
# File 'lib/zenlish/lex/lexical_entry.rb', line 14 def add_lexeme(aLexeme) lexemes << aLexeme if aLexeme end |