Class: Daneel::Plugin
- Inherits:
-
Object
- Object
- Daneel::Plugin
- Defined in:
- lib/daneel/plugin.rb
Defined Under Namespace
Classes: DepError
Instance Attribute Summary collapse
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(robot) ⇒ Plugin
constructor
A new instance of Plugin.
- #logger ⇒ Object
Constructor Details
#initialize(robot) ⇒ Plugin
Returns a new instance of Plugin.
5 6 7 |
# File 'lib/daneel/plugin.rb', line 5 def initialize(robot) @robot = robot end |
Instance Attribute Details
#robot ⇒ Object (readonly)
Returns the value of attribute robot.
3 4 5 |
# File 'lib/daneel/plugin.rb', line 3 def robot @robot end |
Class Method Details
.requires_env(*keys) ⇒ Object
15 16 17 18 |
# File 'lib/daneel/plugin.rb', line 15 def self.requires_env(*keys) missing = keys.flatten.select{|k| ENV[k].nil? || ENV[k].empty? } raise DepError, "#{missing.join(',')} must be set" if missing.any? end |
Instance Method Details
#logger ⇒ Object
9 10 11 |
# File 'lib/daneel/plugin.rb', line 9 def logger robot.logger end |