Class: Dynamic
- Inherits:
-
Object
- Object
- Dynamic
- Defined in:
- lib/reggae.rb
Overview
dynamic target
Instance Method Summary collapse
-
#initialize(func_name, args) ⇒ Dynamic
constructor
A new instance of Dynamic.
- #jsonify ⇒ Object
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
#jsonify ⇒ Object
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 |