Method: RFunk::Function#execute

Defined in:
lib/rfunk/attribute/function.rb

#execute(*args) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rfunk/attribute/function.rb', line 45

def execute(*args)
  validate_parameter_types(*args)
  return_value = instance_exec(*args, &block)

  if body_block
    execute_body_block
  else
    validate_return_type(return_value)
    RFunk.option(return_value)
  end
end