Class: LLT::Morphologizer::LookupStatement
- Inherits:
-
Object
- Object
- LLT::Morphologizer::LookupStatement
- Defined in:
- lib/llt/morphologizer/lookup_statement.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
(also: #options)
readonly
Returns the value of attribute components.
Instance Method Summary collapse
-
#initialize(*args) ⇒ LookupStatement
constructor
A new instance of LookupStatement.
- #stem_type ⇒ Object
- #to_query ⇒ Object
- #to_s ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(*args) ⇒ LookupStatement
Returns a new instance of LookupStatement.
7 8 9 10 |
# File 'lib/llt/morphologizer/lookup_statement.rb', line 7 def initialize(*args) @stem, @table, @column, @itypes, @components = args safety_clones end |
Instance Attribute Details
#components ⇒ Object (readonly) Also known as: options
Returns the value of attribute components.
4 5 6 |
# File 'lib/llt/morphologizer/lookup_statement.rb', line 4 def components @components end |
Instance Method Details
#stem_type ⇒ Object
12 13 14 |
# File 'lib/llt/morphologizer/lookup_statement.rb', line 12 def stem_type @column end |
#to_query ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/llt/morphologizer/lookup_statement.rb', line 20 def to_query { type: @table, stem: @stem, stem_type: @column, restrictions: build_restrictions } end |
#to_s ⇒ Object
29 30 31 |
# File 'lib/llt/morphologizer/lookup_statement.rb', line 29 def to_s "Looking up #{@stem.light_green} as #{@table}, #{@column} #{"with #{components_to_s}" if @components.any? } (classes: #{@itypes * ", "})" end |
#type ⇒ Object
16 17 18 |
# File 'lib/llt/morphologizer/lookup_statement.rb', line 16 def type @table end |