Module: Fend::Plugins::Coercions::InstanceMethods

Defined in:
lib/fend/plugins/coercions.rb

Instance Method Summary collapse

Instance Method Details

#process_input(data) ⇒ Object



225
226
227
228
# File 'lib/fend/plugins/coercions.rb', line 225

def process_input(data)
  data = super || data
  coerce(data)
end

#type_schemaObject

Raises:



215
216
217
218
219
220
221
222
223
# File 'lib/fend/plugins/coercions.rb', line 215

def type_schema
  schema = self.class.type_schema

  return {} if schema.nil?

  raise Error, "type schema must be hash" unless schema.is_a?(Hash)

  schema
end