class Ruboty::CanIBorrow::Actions::Base

Public Instance Methods

borrow_history() click to toggle source
# File lib/ruboty/can_i_borrow/actions/base.rb, line 19
def borrow_history
  leager[item]
end
borrowed?() click to toggle source
# File lib/ruboty/can_i_borrow/actions/base.rb, line 11
def borrowed?
  !borrow_history.nil?
end
borrower?() click to toggle source
# File lib/ruboty/can_i_borrow/actions/base.rb, line 15
def borrower?
  borrow_history[:user] == message.from_name
end
item() click to toggle source
# File lib/ruboty/can_i_borrow/actions/base.rb, line 23
def item
  message[:item]
end
leager() click to toggle source
# File lib/ruboty/can_i_borrow/actions/base.rb, line 7
def leager
  message.robot.brain.data[Ruboty::CanIBorrow::NAME_SPACE] ||= {}
end