Class: Escort::Setup::Configuration::Instance
- Inherits:
-
Object
- Object
- Escort::Setup::Configuration::Instance
- Defined in:
- lib/escort/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/escort/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/escort/setup/configuration/instance.rb', line 11 def data @data end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
11 12 13 |
# File 'lib/escort/setup/configuration/instance.rb', line 11 def path @path end |
Class Method Details
.blank ⇒ Object
6 7 8 |
# File 'lib/escort/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/escort/setup/configuration/instance.rb', line 18 def blank? data.empty? end |
#global ⇒ Object
23 24 25 |
# File 'lib/escort/setup/configuration/instance.rb', line 23 def global data[:global] || {} end |
#user ⇒ Object
27 28 29 |
# File 'lib/escort/setup/configuration/instance.rb', line 27 def user data[:user] || {} end |