Module: Taro::Types::Coercion
- Defined in:
- lib/taro/types/coercion.rb
Class Method Summary collapse
- .call(arg) ⇒ Object
- .derived_suffix ⇒ Object
-
.keys ⇒ Object
Coercion keys can be expanded by the DerivedTypes module.
Class Method Details
.call(arg) ⇒ Object
3 4 5 6 |
# File 'lib/taro/types/coercion.rb', line 3 def call(arg) validate_hash(arg) from_hash(arg) end |
.derived_suffix ⇒ Object
13 14 15 |
# File 'lib/taro/types/coercion.rb', line 13 def derived_suffix '_of' end |
.keys ⇒ Object
Coercion keys can be expanded by the DerivedTypes module.
9 10 11 |
# File 'lib/taro/types/coercion.rb', line 9 def keys @keys ||= %i[type] end |