class Superlime::Command

Public Class Methods

call(args) click to toggle source
# File lib/superlime/command.rb, line 3
def self.call(args)
  catch(:broadcast) do
    new(args).call
  end
end
new(*args) click to toggle source
# File lib/superlime/command.rb, line 9
def initialize(*args)
  raise NotImplementedError, "must implement #initialize on subclass"
end

Public Instance Methods

call() click to toggle source
# File lib/superlime/command.rb, line 13
def call
  raise NotImplementedError, "must implement #call on subclass"
end

Private Instance Methods

broadcast(event, payload) click to toggle source
# File lib/superlime/command.rb, line 19
def broadcast(event, payload)
  throw(:broadcast, event => payload)
end