lib/upgrow/actions.rb in upgrow-0.0.3 vs lib/upgrow/actions.rb in upgrow-0.0.4

- old
+ new

@@ -22,10 +22,10 @@ # @param names [Array<String>] one or more names, the last one being the # name of the Action without the "Action" suffix, optionally lowercased. # # @return [Action] the Action specified by the names. def [](*names) - action_class_name = names.map(&:capitalize).join('::') + 'Action' + action_class_name = "#{names.map(&:capitalize).join("::")}Action" Object.const_get(action_class_name) end end end