Skip to content

Commit

Permalink
Dynamically create accessors for Cerberus::Status
Browse files Browse the repository at this point in the history
  • Loading branch information
phinze committed May 19, 2009
1 parent 855418a commit a21872c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/cerberus/manager.rb
Expand Up @@ -264,6 +264,9 @@ def initialize(param)

@previous_build_successful = @hash['successful']
@previous_brokeness = @hash['brokeness']

# Create some convenience methods to access status
@hash.keys.each { |key| self.class.send(:define_method, key) { @hash[key] } }
end

def self.read(file_name)
Expand Down

0 comments on commit a21872c

Please sign in to comment.