Class: Croods::Attribute
- Inherits:
-
Object
- Object
- Croods::Attribute
- Defined in:
- lib/croods/attribute.rb
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#default_function ⇒ Object
Returns the value of attribute default_function.
-
#name ⇒ Object
Returns the value of attribute name.
-
#null ⇒ Object
Returns the value of attribute null.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, null: nil, default: nil, default_function: nil) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(name, type, null: nil, default: nil, default_function: nil) ⇒ Attribute
Returns a new instance of Attribute.
7 8 9 10 11 12 13 |
# File 'lib/croods/attribute.rb', line 7 def initialize(name, type, null: nil, default: nil, default_function: nil) self.name = name.to_s self.type = type self.null = null self.default = default self.default_function = default_function end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
5 6 7 |
# File 'lib/croods/attribute.rb', line 5 def default @default end |
#default_function ⇒ Object
Returns the value of attribute default_function.
5 6 7 |
# File 'lib/croods/attribute.rb', line 5 def default_function @default_function end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/croods/attribute.rb', line 5 def name @name end |
#null ⇒ Object
Returns the value of attribute null.
5 6 7 |
# File 'lib/croods/attribute.rb', line 5 def null @null end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/croods/attribute.rb', line 5 def type @type end |