Module: TARS
- Defined in:
- lib/tars.rb,
lib/tars/api.rb,
lib/tars/bot.rb,
lib/tars/update.rb,
lib/tars/version.rb
Defined Under Namespace
Classes: API, Bot, Configurator, PostHandler, Server, Update
Constant Summary collapse
- VERSION =
'0.1.1'
Class Attribute Summary collapse
-
.bot ⇒ Object
Returns the value of attribute bot.
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.bot ⇒ Object
Returns the value of attribute bot.
10 11 12 |
# File 'lib/tars.rb', line 10 def bot @bot end |
.config ⇒ Object
Returns the value of attribute config.
10 11 12 |
# File 'lib/tars.rb', line 10 def config @config end |
Class Method Details
.bootstrap ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/tars.rb', line 23 def self.bootstrap puts "Setting webhook for Bot to #{TARS.config.webhook}" TARS::API.webhook puts 'Launch TARS server' server = TARS::Server.new server.run! end |
.configure {|config| ... } ⇒ Object
17 18 19 20 21 |
# File 'lib/tars.rb', line 17 def self.configure self.config ||= Configurator.new yield config @bot = TARS::Bot.new end |