Class: Ridgepole::DSLParser::Context::TableDefinition
- Inherits:
-
Object
- Object
- Ridgepole::DSLParser::Context::TableDefinition
- Defined in:
- lib/ridgepole/dsl_parser.rb
Constant Summary collapse
- TYPES =
[ :string, :text, :integer, :float, :decimal, :datetime, :timestamp, :time, :date, :binary, :boolean ]
Instance Attribute Summary collapse
-
#__definition ⇒ Object
readonly
Returns the value of attribute __definition.
Instance Method Summary collapse
- #column(name, type, options = {}) ⇒ Object
-
#initialize ⇒ TableDefinition
constructor
A new instance of TableDefinition.
Constructor Details
#initialize ⇒ TableDefinition
Returns a new instance of TableDefinition.
6 7 8 |
# File 'lib/ridgepole/dsl_parser.rb', line 6 def initialize @__definition = {} end |
Instance Attribute Details
#__definition ⇒ Object (readonly)
Returns the value of attribute __definition.
4 5 6 |
# File 'lib/ridgepole/dsl_parser.rb', line 4 def __definition @__definition end |
Instance Method Details
#column(name, type, options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ridgepole/dsl_parser.rb', line 10 def column(name, type, = {}) @__definition[name] = { :type => type, :options => , } end |