Class: Juvet::Bot
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#attribute!, #attributes, #initialize!
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
5
6
7
|
# File 'lib/juvet/bot.rb', line 5
def id
@id
end
|
Class Method Details
.all! ⇒ Object
8
9
10
|
# File 'lib/juvet/bot.rb', line 8
def all!
BotRepository.all
end
|
.create(id, attributes = {}) ⇒ Object
12
13
14
|
# File 'lib/juvet/bot.rb', line 12
def create(id, attributes={})
new attributes.merge(id: id)
end
|
.create!(id, attributes = {}) ⇒ Object
16
17
18
|
# File 'lib/juvet/bot.rb', line 16
def create!(id, attributes={})
BotRepository.create create(id, attributes)
end
|
.destroy!(id) ⇒ Object
20
21
22
|
# File 'lib/juvet/bot.rb', line 20
def destroy!(id)
BotRepository.destroy id
end
|
.find!(id) ⇒ Object
24
25
26
|
# File 'lib/juvet/bot.rb', line 24
def find!(id)
BotRepository.find id
end
|
Instance Method Details
#update!(attributes = {}) ⇒ Object
29
30
31
|
# File 'lib/juvet/bot.rb', line 29
def update!(attributes={})
BotRepository.update self
end
|