Class: Ruboty::Handlers::Karma

Inherits:
Base
  • Object
show all
Defined in:
lib/ruboty/karma.rb

Constant Summary collapse

INCREMENT_PATTERN =
/@?(?<name>[^@:\s]+):?\s+\+\+/m
DELETE_PATTERN =
/delete karma @?(?<name>[^@:\s]+):?/m
LIST_PATTERN =
/list karma(\s+(?<args>.+))?/

Instance Method Summary collapse

Instance Method Details

#delete(message) ⇒ Object



38
39
40
# File 'lib/ruboty/karma.rb', line 38

def delete(message)
  Ruboty::Karma::Actions::Delete.new(message).call
end

#increment(message) ⇒ Object



30
31
32
# File 'lib/ruboty/karma.rb', line 30

def increment(message)
  Ruboty::Karma::Actions::Increase.new(message).call
end

#list(message) ⇒ Object



34
35
36
# File 'lib/ruboty/karma.rb', line 34

def list(message)
  Ruboty::Karma::Actions::List.new(message).call
end