Class: TypedFields::ProcType

Inherits:
Object
  • Object
show all
Defined in:
lib/typed_fields.rb

Instance Method Summary collapse

Constructor Details

#initialize(proc) ⇒ ProcType

Returns a new instance of ProcType.



51
52
53
# File 'lib/typed_fields.rb', line 51

def initialize proc
  @proc = proc
end

Instance Method Details

#parse(obj) ⇒ Object



55
56
57
# File 'lib/typed_fields.rb', line 55

def parse obj
  @proc.call obj
end