Class: CodeigniterScaffold::Attribute
- Inherits:
-
Object
- Object
- CodeigniterScaffold::Attribute
- Defined in:
- lib/codeigniter_scaffold/attribute.rb
Instance Attribute Summary collapse
-
#mysql_type ⇒ Object
Returns the value of attribute mysql_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(argument) ⇒ Attribute
constructor
A new instance of Attribute.
Constructor Details
#initialize(argument) ⇒ Attribute
Returns a new instance of Attribute.
6 7 8 9 10 11 |
# File 'lib/codeigniter_scaffold/attribute.rb', line 6 def initialize(argument) @name = argument.split(":")[0].downcase @type = argument.split(":")[1].downcase @mysql_type = find_mysql_type validate end |
Instance Attribute Details
#mysql_type ⇒ Object
Returns the value of attribute mysql_type.
4 5 6 |
# File 'lib/codeigniter_scaffold/attribute.rb', line 4 def mysql_type @mysql_type end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/codeigniter_scaffold/attribute.rb', line 4 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/codeigniter_scaffold/attribute.rb', line 4 def type @type end |