Class: StoreSchema::Configuration
- Inherits:
-
Object
- Object
- StoreSchema::Configuration
- Defined in:
- lib/store_schema/configuration.rb
Instance Attribute Summary collapse
- #attributes ⇒ Hash readonly
- #column ⇒ Symbol readonly
Instance Method Summary collapse
- #boolean(attribute) ⇒ Object
- #datetime(attribute) ⇒ Object
- #float(attribute) ⇒ Object
-
#initialize(column) ⇒ Configuration
constructor
A new instance of Configuration.
- #integer(attribute) ⇒ Object
- #string(attribute) ⇒ Object
Constructor Details
#initialize(column) ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 |
# File 'lib/store_schema/configuration.rb', line 15 def initialize(column) @column = column @attributes = {} end |
Instance Attribute Details
#attributes ⇒ Hash (readonly)
11 12 13 |
# File 'lib/store_schema/configuration.rb', line 11 def attributes @attributes end |
#column ⇒ Symbol (readonly)
7 8 9 |
# File 'lib/store_schema/configuration.rb', line 7 def column @column end |
Instance Method Details
#boolean(attribute) ⇒ Object
51 52 53 |
# File 'lib/store_schema/configuration.rb', line 51 def boolean(attribute) attributes[attribute] = :boolean end |
#datetime(attribute) ⇒ Object
44 45 46 |
# File 'lib/store_schema/configuration.rb', line 44 def datetime(attribute) attributes[attribute] = :datetime end |
#float(attribute) ⇒ Object
37 38 39 |
# File 'lib/store_schema/configuration.rb', line 37 def float(attribute) attributes[attribute] = :float end |
#integer(attribute) ⇒ Object
30 31 32 |
# File 'lib/store_schema/configuration.rb', line 30 def integer(attribute) attributes[attribute] = :integer end |
#string(attribute) ⇒ Object
23 24 25 |
# File 'lib/store_schema/configuration.rb', line 23 def string(attribute) attributes[attribute] = :string end |