Method: DataType::Base#initialize
- Defined in:
- lib/dsl/data_type.rb
#initialize(options = {}) ⇒ Base
Pass the developer’s ActiveRecord::Base structure and we’ll decide the best structure
9 10 11 12 13 14 15 16 |
# File 'lib/dsl/data_type.rb', line 9 def initialize(={}) @options = @value = .delete(:value) @example = .delete(:example) @field = .delete(:field) @aliases = .delete(:was) || ::Array.new [:type] = .delete(:as) if [:as] # Nice little DSL alias for 'type' end |