Sha256: 2d431aab35b632dae4a47735c7b1c19b8099d6be2ba54ce4f47747ebcad0970f

Contents?: true

Size: 399 Bytes

Versions: 2

Compression:

Stored size: 399 Bytes

Contents

module Ocp::Registry
	class CloudManager

    class Mock < CloudManager 
    	class Model
	    	def initialize(properties)
	    		if properties.is_a? (Hash)
	    			@properties = properties
	    		end
	    	end

	    	def method_missing(method, *args)
	    		return @properties[method.to_sym]
	    	end

	    	def to_json
	    		Yajl::Encoder.encode(@properties)
	    	end
    	end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ocp_registry-0.0.5.pre lib/ocp_registry/cloud_manager/mock/model.rb
ocp_registry-0.0.1.alpha lib/ocp_registry/cloud_manager/mock/model.rb