Sha256: e72d5135d6faa1efd5237dcb8959354b50d051dc5c2662eab854f7d6a5562614

Contents?: true

Size: 312 Bytes

Versions: 3

Compression:

Stored size: 312 Bytes

Contents

module Locomotive::Coal

  class Resource

    attr_accessor :attributes

    def initialize(attributes)
      @attributes = attributes
    end

    def method_missing(name, *args)
      if self.attributes.key?(name.to_s)
        self.attributes[name.to_s]
      else
        super
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
locomotivecms_coal-1.0.0.pre.alpha.2 lib/locomotive/coal/resource.rb
locomotivecms_coal-1.0.0.pre.alpha.1 lib/locomotive/coal/resource.rb
locomotivecms_coal-1.0.0.pre.alpha lib/locomotive/coal/resource.rb