Module: Plumb::Callable
- Included in:
- Composable, Schema::Field
- Defined in:
- lib/plumb/composable.rb
Instance Method Summary collapse
Instance Method Details
#call(result) ⇒ Object
37 38 39 |
# File 'lib/plumb/composable.rb', line 37 def call(result) raise NotImplementedError, "Implement #call(Result) => Result in #{self.class}" end |
#parse(value = Undefined) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/plumb/composable.rb', line 30 def parse(value = Undefined) result = resolve(value) raise ParseError, result.errors if result.invalid? result.value end |