Class: Strum::SerializerClass

Inherits:
Object
  • Object
show all
Includes:
Service
Defined in:
lib/strum/serializer_class.rb

Instance Method Summary collapse

Methods included from Service

#errors, #execute, #failure, #hook, included, #initialize, #method_missing, #on, #respond_to_missing?, #success, #valid?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Strum::Service

Instance Method Details

#auditObject



15
16
17
# File 'lib/strum/serializer_class.rb', line 15

def audit
  required(:name)
end

#callObject



9
10
11
12
13
# File 'lib/strum/serializer_class.rb', line 9

def call
  output(Kernel.const_get(name.to_s + "Serializer"))
rescue StandardError => e
  add_error(:serializer, e)
end