class PUNK::Runnable
Public Class Methods
args(*args)
click to toggle source
# File lib/punk/framework/runnable.rb, line 7 def self.args(*args) PUNK.store.runnable ||= {} return PUNK.store.runnable[name] if PUNK.store.runnable.key?(name) PUNK.store.runnable[name] = args end
Public Instance Methods
method_missing(key, *args, &block)
click to toggle source
Calls superclass method
PUNK::Settings#method_missing
# File lib/punk/framework/runnable.rb, line 13 def method_missing(key, *args, &block) val = super val = val.to_h if val.instance_of?(self.class) val end
respond_to_missing?(key, *args)
click to toggle source
Calls superclass method
PUNK::Settings#respond_to_missing?
# File lib/punk/framework/runnable.rb, line 19 def respond_to_missing?(key, *args) # rubocop:disable Lint/UselessMethodDefinition super end
Private Instance Methods
_init_runnable(kwargs)
click to toggle source
# File lib/punk/framework/runnable.rb, line 25 def _init_runnable(kwargs) args = self.class.args || [] load(args.zip(Array.new(args.length, nil)).to_h) load(kwargs.select { |k, _| args.include?(k) }) end