Module: Taro::Types::Coercion

Defined in:
lib/taro/types/coercion.rb

Class Method Summary collapse

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_suffixObject



13
14
15
# File 'lib/taro/types/coercion.rb', line 13

def derived_suffix
  '_of'
end

.keysObject

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