module MiniAutobot

The base module for everything MiniAutobot and is the container for other modules and classes in the hierarchy:

Constants

VERSION

Public Class Methods

gem_root() click to toggle source

Absolute path of root directory of this gem can be used both within this gem and in automation repo

# File lib/mini_autobot/init.rb, line 44
def self.gem_root
  @@__gem_root__ ||= Pathname.new(File.realpath(File.join(File.dirname(__FILE__), '..', '..')))
end
google_sheets() click to toggle source
# File lib/mini_autobot/init.rb, line 48
def self.google_sheets
  @@google_sheets ||= GoogleSheets.new(session: MiniAutobot.root.join('config/mini_autobot', 'google_drive_config.json'), spreadsheet: MiniAutobot.settings.google_sheet)
end
logger() click to toggle source
# File lib/mini_autobot/init.rb, line 11
def self.logger
  @@logger ||= MiniAutobot::Logger.new($stdout)
end
logger=(value) click to toggle source
# File lib/mini_autobot/init.rb, line 15
def self.logger=(value)
  @@logger = value
end
root() click to toggle source

Root directory of the automation repository. Automation repo can use it to refer to files within itself, and this gem also uses it to refer to config files of automation, for example:

File.read(MiniAutobot.root.join('config/mini_autobot', 'data.yml'))

will return the contents of `automation_root/config/mini_autobot/data.yml`.

@return [Pathname] A reference to the root directory, ready to be used

in directory and file path calculations.
# File lib/mini_autobot/init.rb, line 38
def self.root
  @@__root__ ||= Pathname.new(File.expand_path('.'))
end
settings() click to toggle source
# File lib/mini_autobot/init.rb, line 19
def self.settings
  @@settings ||= Settings.new
end
settings=(options) click to toggle source
# File lib/mini_autobot/init.rb, line 23
def self.settings=(options)
  self.settings.merge!(options)
end