class Ruboty::CanIBorrow::Actions::Borrow
Public Instance Methods
call()
click to toggle source
# File lib/ruboty/can_i_borrow/actions/borrow.rb, line 5 def call unless borrowed? borrow message.reply("#{item}を貸し出し状態にします。") else message.reply("#{item}は#{borrow_history[:borrowed_at]}に#{borrow_history[:user]}さんに貸し出されています。") end end
Private Instance Methods
borrow()
click to toggle source
# File lib/ruboty/can_i_borrow/actions/borrow.rb, line 16 def borrow leager[item] = { item: item, user: message.from_name, borrowed_at: Date.today } end