Class: Action
- Inherits:
-
Object
- Object
- Action
- Defined in:
- lib/tutter/action.rb
Class Method Summary collapse
Class Method Details
.create(action, settings, client, project, event, data) ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'lib/tutter/action.rb', line 2 def self.create(action, settings, client, project, event, data) begin require "tutter/action/#{action.downcase}" rescue LoadError => e raise "Unsupported action #{action}: #{e}" end class_name = action.split("_").map {|v| v.capitalize }.join const_get(class_name).new settings, client, project, data, event end |