class Motion::Launchpad::Event

Attributes

callback[R]
count[R]

Public Class Methods

new(count, callback) click to toggle source
# File lib/motion/launchpad/event.rb, line 6
def initialize(count, callback)
  @count, @callback = count, callback
end

Public Instance Methods

applicable?(launch) click to toggle source
# File lib/motion/launchpad/event.rb, line 14
def applicable?(launch)
  every? || launch == count
end
call() click to toggle source
# File lib/motion/launchpad/event.rb, line 10
def call
  callback.call
end
every?() click to toggle source
# File lib/motion/launchpad/event.rb, line 18
def every?
  count == :every
end