Class: Dynamic

Inherits:
Object
  • Object
show all
Defined in:
lib/reggae.rb

Overview

dynamic target

Instance Method Summary collapse

Constructor Details

#initialize(func_name, args) ⇒ Dynamic

Returns a new instance of Dynamic.



172
173
174
175
# File 'lib/reggae.rb', line 172

def initialize(func_name, args)
  @func_name = func_name
  @args = args
end

Instance Method Details

#jsonifyObject



177
178
179
180
181
182
183
184
185
186
187
# File 'lib/reggae.rb', line 177

def jsonify
  hash = { type: 'dynamic', func: @func_name }
  @args.each do |k, v|
    if v.respond_to? :jsonify
      hash[k] = v.jsonify
    else
      hash[k] = v
    end
  end
  hash
end