Class: Context
- Inherits:
-
Object
- Object
- Context
- Defined in:
- lib/ha/context.rb
Constant Summary collapse
- FILE_SPEC =
"#{Dir.home}/.ha"
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
Instance Method Summary collapse
-
#initialize ⇒ Context
constructor
A new instance of Context.
- #save ⇒ Object
Constructor Details
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
5 6 7 |
# File 'lib/ha/context.rb', line 5 def context @context end |
Instance Method Details
#save ⇒ Object
15 16 17 18 19 |
# File 'lib/ha/context.rb', line 15 def save puts "saving context" myfile = File.open(FILE_SPEC, "w") myfile.write(@context.to_yaml) end |