Sha256: 8276e7b774ae309c06749d930dbd4e9dc668673ff832665f4b17c62c9cb8bd80

Contents?: true

Size: 386 Bytes

Versions: 1

Compression:

Stored size: 386 Bytes

Contents

module Punchfork
  
  # Wrapper for recipe search results.  Provides dot syntax support.
  class Recipe
    
    def initialize(*args)
      @hash = args[0]
      @attributes = {}
      @hash.each do |k, v|
        instance_variable_set("@#{k}", v)
        self.class.class_eval{attr_reader k}
        @attributes[k] = v
      end
    end
    
    attr_reader :attributes
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
punchfork-0.0.4 lib/punchfork/recipe.rb