Sha256: b1613ab118b27d695ba488e957b613c15545e1de680ba1a397c4f209a2dfd3d8

Contents?: true

Size: 350 Bytes

Versions: 1

Compression:

Stored size: 350 Bytes

Contents

class Action
  def self.create(action, settings, client, project, 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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tutter-0.0.1 lib/tutter/action.rb