Class: Kaigara::Environment
- Inherits:
-
Object
- Object
- Kaigara::Environment
- Defined in:
- app/models/sysops/environment.rb
Overview
This class is for managing variables and configurations.
Instance Attribute Summary collapse
-
#vars ⇒ Object
Returns the value of attribute vars.
Class Method Summary collapse
-
.load_variables(op) ⇒ Object
Loads variables to class
op
.
Instance Attribute Details
permalink #vars ⇒ Object
Returns the value of attribute vars.
7 8 9 |
# File 'app/models/sysops/environment.rb', line 7 def vars @vars end |
Class Method Details
permalink .load_variables(op) ⇒ Object
Loads variables to class op
10 11 12 13 14 15 16 |
# File 'app/models/sysops/environment.rb', line 10 def self.load_variables(op) pkg = Package.new @vars = pkg.load! @vars.data.each_pair do |k, v| op.instance_variable_set("@#{k}".to_sym, v) end if @vars end |