Class: Juvet::Bot

Inherits:
Object
  • Object
show all
Includes:
Attributable
Defined in:
lib/juvet/bot.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Attributable

#attribute!, #attributes, #initialize!

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/juvet/bot.rb', line 5

def id
  @id
end

Class Method Details

.create(id, attributes = {}) ⇒ Object



8
9
10
# File 'lib/juvet/bot.rb', line 8

def create(id, attributes={})
  new id, attributes
end

.create!(id, attributes = {}) ⇒ Object



12
13
14
# File 'lib/juvet/bot.rb', line 12

def create!(id, attributes={})
  BotRepository.create create(id, attributes)
end

.destroy!(id) ⇒ Object



16
17
18
# File 'lib/juvet/bot.rb', line 16

def destroy!(id)
  BotRepository.destroy id
end

.find!(id) ⇒ Object



20
21
22
# File 'lib/juvet/bot.rb', line 20

def find!(id)
  BotRepository.find id
end

Instance Method Details

#update!(attributes = {}) ⇒ Object



25
26
27
# File 'lib/juvet/bot.rb', line 25

def update!(attributes={})
  BotRepository.update self
end