summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2018-05-09 16:01:04 -0600
committermo <mo.khan@gmail.com>2018-05-09 16:01:04 -0600
commit839142fbe727d2c15e05a8260a3ab090d3f2be2c (patch)
tree4972ae01cbffe420ebba2db2a71b43740e04a77a
parent212279b31495f988849222e5a3b89667712dfa90 (diff)
extract singleton for Del.bot.v0.1.13
-rw-r--r--lib/del.rb7
-rw-r--r--lib/del/version.rb2
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/del.rb b/lib/del.rb
index ba575df..c0c5508 100644
--- a/lib/del.rb
+++ b/lib/del.rb
@@ -26,8 +26,7 @@ module Del
logger.debug(message.to_s)
end
@configuration.load(settings[:startup_file])
- del = Robot.new(configuration: @configuration)
- del.get_funky!(start_server: settings[:start_server])
+ bot.get_funky!(start_server: settings[:start_server])
end
def self.configure
@@ -41,4 +40,8 @@ module Del
def self.logger
@logger ||= configuration.logger
end
+
+ def self.bot
+ @bot ||= Robot.new(configuration: configuration)
+ end
end
diff --git a/lib/del/version.rb b/lib/del/version.rb
index a3b6cbe..521ddcf 100644
--- a/lib/del/version.rb
+++ b/lib/del/version.rb
@@ -1,3 +1,3 @@
module Del
- VERSION = "0.1.12"
+ VERSION = "0.1.13"
end