Class: TypedFields::ProcType
- Inherits:
-
Object
- Object
- TypedFields::ProcType
- Defined in:
- lib/typed_fields.rb
Instance Method Summary collapse
-
#initialize(proc) ⇒ ProcType
constructor
A new instance of ProcType.
- #parse(obj) ⇒ Object
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 |