Class: LLT::NounBuilder
- Inherits:
-
DeclinableBuilder
- Object
- FormBuilder
- DeclinableBuilder
- LLT::NounBuilder
- Defined in:
- lib/llt/form_builder/noun_builder.rb
Constant Summary
Constants inherited from FormBuilder
Instance Attribute Summary collapse
-
#persona ⇒ Object
readonly
Returns the value of attribute persona.
-
#place ⇒ Object
readonly
Returns the value of attribute place.
Attributes inherited from DeclinableBuilder
Attributes inherited from FormBuilder
Instance Method Summary collapse
- #er_nominative_possible? ⇒ Boolean
- #init_keys ⇒ Object
- #nominatives ⇒ Object
- #stays_capitalized ⇒ Object
Methods inherited from DeclinableBuilder
#additional_forms, #casus_numerus_sexus_by_index, #compute, #endings_lookup, #extended_special_forms, #index_of_ending, #indices, #initialize, #irregulars_with_nominative, #new_attributes, #new_form_through_index, #new_special_form, #o_declension_on_ius?, #pronominal_declension?, #proper_vocative, #regular_forms, #regular_o_declension?, #special_ending, #with_replacements
Methods inherited from FormBuilder
#attributes_by_index, build, #compute, #corrections, #cross_indices, #default_args, #downcase_all_stems, #endings, #endings_attributes, #endings_container, #endings_lookup, #endings_namespace, #endings_path, #extensions_and_other_signs, #form_class, #indices_by_ending, #initialize, #keep_given_value, lookup_class, #lookup_indices, #needs_validation?, #new_form, #prefix, #reverse_lookup, #stem_copy, #valid?, #validation_rule, #validations, validations, #value_as_index
Constructor Details
This class inherits a constructor from LLT::DeclinableBuilder
Instance Attribute Details
#persona ⇒ Object (readonly)
Returns the value of attribute persona.
6 7 8 |
# File 'lib/llt/form_builder/noun_builder.rb', line 6 def persona @persona end |
#place ⇒ Object (readonly)
Returns the value of attribute place.
6 7 8 |
# File 'lib/llt/form_builder/noun_builder.rb', line 6 def place @place end |
Instance Method Details
#er_nominative_possible? ⇒ Boolean
20 21 22 |
# File 'lib/llt/form_builder/noun_builder.rb', line 20 def er_nominative_possible? @inflection_class == 2 && ! o_declension_on_ius? # fili has no ending as well! end |
#init_keys ⇒ Object
8 9 10 |
# File 'lib/llt/form_builder/noun_builder.rb', line 8 def init_keys super + %i{ persona place } end |
#nominatives ⇒ Object
16 17 18 |
# File 'lib/llt/form_builder/noun_builder.rb', line 16 def nominatives [[@nom, 1, 1]] end |
#stays_capitalized ⇒ Object
12 13 14 |
# File 'lib/llt/form_builder/noun_builder.rb', line 12 def stays_capitalized @persona || @place end |