Sha256: f8f2fe80f25784882b028c1f06e3e8f2afdb700aae6ceb4964a5a527774c166b

Contents?: true

Size: 472 Bytes

Versions: 1

Compression:

Stored size: 472 Bytes

Contents

# provide some properties before we have a real node or relationship
module Neo4j
	module Rails
		module ValueProperties
			include Neo4j::Property
			
			# override Neo4j::Property#props
			def props
				@props ||= {}
			end
			
			def has_property?(key)
				!props[key].nil?
			end
			
			def set_property(key,value)
				props[key] = value
			end
	
			def get_property(key)
				props[key]
			end
	
			def remove_property(key)
				props.delete(key)
			end
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
neo4j-1.0.0.beta.20 lib/neo4j/rails/value_properties.rb