Method: Undestroy::Config::Field#initialize
- Defined in:
- lib/undestroy/config/field.rb
#initialize(name, type, value = nil, &block) ⇒ Field
Returns a new instance of Field.
9 10 11 12 13 |
# File 'lib/undestroy/config/field.rb', line 9 def initialize(name, type, value=nil, &block) self.name = name self.type = type self.raw_value = block || value || raise(ArgumentError, "Must pass a value or block") end |