Module: Neoid::Node

Defined in:
lib/neoid/node.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



3
4
5
6
7
# File 'lib/neoid/node.rb', line 3

def self.from_hash(hash)
  node = Neography::Node.new(hash)
  node.neo_server = Neoid.db
  node
end

.included(receiver) ⇒ Object



203
204
205
206
207
208
# File 'lib/neoid/node.rb', line 203

def self.included(receiver)
  receiver.send :include, Neoid::ModelAdditions
  receiver.extend         ClassMethods
  receiver.send :include, InstanceMethods
  Neoid.node_models << receiver
end