Class: Convoy::Setup::Configuration::Instance
- Inherits:
-
Object
- Object
- Convoy::Setup::Configuration::Instance
- Defined in:
- lib/convoy/setup/configuration/instance.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #blank? ⇒ Boolean (also: #empty?)
- #global ⇒ Object
-
#initialize(path, hash) ⇒ Instance
constructor
A new instance of Instance.
- #user ⇒ Object
Constructor Details
#initialize(path, hash) ⇒ Instance
Returns a new instance of Instance.
13 14 15 16 |
# File 'lib/convoy/setup/configuration/instance.rb', line 13 def initialize(path, hash) @data = hash @path = path end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/convoy/setup/configuration/instance.rb', line 11 def data @data end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
11 12 13 |
# File 'lib/convoy/setup/configuration/instance.rb', line 11 def path @path end |
Class Method Details
.blank ⇒ Object
6 7 8 |
# File 'lib/convoy/setup/configuration/instance.rb', line 6 def blank self.new(nil, {}) end |
Instance Method Details
#blank? ⇒ Boolean Also known as: empty?
18 19 20 |
# File 'lib/convoy/setup/configuration/instance.rb', line 18 def blank? data.empty? end |
#global ⇒ Object
24 25 26 |
# File 'lib/convoy/setup/configuration/instance.rb', line 24 def global data[:global] || {} end |
#user ⇒ Object
28 29 30 |
# File 'lib/convoy/setup/configuration/instance.rb', line 28 def user data[:user] || {} end |