module Quby::Compiler::DSL::CallsCustomMethods
Attributes
custom_methods[R]
Public Class Methods
new(*args, **options)
click to toggle source
Calls superclass method
# File lib/quby/compiler/dsl/calls_custom_methods.rb, line 9 def initialize(*args, **options) @custom_methods = options[:custom_methods] || {} super end
Public Instance Methods
method_missing(method_sym, *args, &block)
click to toggle source
Calls superclass method
# File lib/quby/compiler/dsl/calls_custom_methods.rb, line 14 def method_missing(method_sym, *args, &block) if @custom_methods.key? method_sym instance_exec(*args, &custom_methods[method_sym]) else super end end
respond_to_missing?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/quby/compiler/dsl/calls_custom_methods.rb, line 22 def respond_to_missing?(method_name, include_private = false) custom_methods.key?(method_name) || super end