Module: Spik

Includes:
Execution, Models, Validators
Defined in:
lib/spik.rb,
lib/spik/models.rb,
lib/spik/version.rb,
lib/spik/execution.rb,
lib/spik/validators.rb

Defined Under Namespace

Modules: Execution, Models, Validators

Constant Summary collapse

VERSION =
"0.0.3"

Constants included from Validators

Validators::METHOD_NAMES, Validators::WHICH_NAMES

Instance Method Summary collapse

Methods included from Validators

#return_value_of, #spik_method

Methods included from Execution

#execute_class_method, #execute_method

Methods included from Models

#attributes, #class_methods, #model_names

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/spik.rb', line 10

def method_missing(method, *args)
  args.flatten! if args.is_a? Array
  method = method.to_s

  # TODO: catch methods, which cannot be variable name
  spik_method(method, args) # or raise NoMethodError.new('There is no method "' + method + '"')
end