Module: Riaction::Riaction::InstanceMethods
- Defined in:
- lib/riaction/riaction.rb
Instance Method Summary collapse
Instance Method Details
#riaction_resolve_param(poly) ⇒ Object
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/riaction/riaction.rb', line 200 def riaction_resolve_param(poly) case poly when Symbol if poly == :self self else self.send poly end when Proc poly.yield self when Hash resolved_hash = {} poly.each_pair do |key, value| resolved_hash[key] = self.respond_to?(value) ? self.send(value) : value end resolved_hash else poly end end |