class Context
Constants
- FILE_SPEC
Attributes
context[RW]
Public Class Methods
new()
click to toggle source
# File lib/ha/context.rb, line 7 def initialize if File.exist? FILE_SPEC myfile = File.open(FILE_SPEC, "r") @context = YAML.load(myfile.read) end @context ||= {} end
Public Instance Methods
save()
click to toggle source
# File lib/ha/context.rb, line 15 def save puts "saving context" myfile = File.open(FILE_SPEC, "w") myfile.write(@context.to_yaml) end