Class: Tarantool::Generators::ModelGenerator::Field
- Inherits:
-
Data
- Object
- Data
- Tarantool::Generators::ModelGenerator::Field
- Defined in:
- tarantool-rails/lib/generators/tarantool/model/model_generator.rb
Instance Attribute Summary collapse
-
#attribute_type ⇒ Object
readonly
Returns the value of attribute attribute_type.
-
#field_type ⇒ Object
readonly
Returns the value of attribute field_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nullable ⇒ Object
readonly
Returns the value of attribute nullable.
Instance Method Summary collapse
Instance Attribute Details
#attribute_type ⇒ Object (readonly)
Returns the value of attribute attribute_type
10 11 12 |
# File 'tarantool-rails/lib/generators/tarantool/model/model_generator.rb', line 10 def attribute_type @attribute_type end |
#field_type ⇒ Object (readonly)
Returns the value of attribute field_type
10 11 12 |
# File 'tarantool-rails/lib/generators/tarantool/model/model_generator.rb', line 10 def field_type @field_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name
10 11 12 |
# File 'tarantool-rails/lib/generators/tarantool/model/model_generator.rb', line 10 def name @name end |
#nullable ⇒ Object (readonly)
Returns the value of attribute nullable
10 11 12 |
# File 'tarantool-rails/lib/generators/tarantool/model/model_generator.rb', line 10 def nullable @nullable end |
Instance Method Details
#declaration ⇒ Object
11 12 13 |
# File 'tarantool-rails/lib/generators/tarantool/model/model_generator.rb', line 11 def declaration "{ name: :#{name}, type: :#{field_type}#{', is_nullable: true' if nullable} }" end |