Class: ActiveRecordProperties::DSL
- Inherits:
-
Object
- Object
- ActiveRecordProperties::DSL
- Defined in:
- lib/active_record_properties/dsl.rb
Overview
DSL for defining properties
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(column) ⇒ DSL
constructor
A new instance of DSL.
-
#property(name, type: :string, default: nil) ⇒ Object
Define a property.
Constructor Details
#initialize(column) ⇒ DSL
Returns a new instance of DSL.
8 9 10 11 |
# File 'lib/active_record_properties/dsl.rb', line 8 def initialize(column) @column = column @properties = [] end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
6 7 8 |
# File 'lib/active_record_properties/dsl.rb', line 6 def column @column end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
6 7 8 |
# File 'lib/active_record_properties/dsl.rb', line 6 def properties @properties end |