Module: Neoon::Node::ClassMethods

Defined in:
lib/neoon/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#neo_model_configObject (readonly)

Returns the value of attribute neo_model_config.



5
6
7
# File 'lib/neoon/node.rb', line 5

def neo_model_config
  @neo_model_config
end

Instance Method Details

#neoon(opts = {}) {|neo_model_config| ... } ⇒ Object

Yields:



11
12
13
14
15
16
17
18
# File 'lib/neoon/node.rb', line 11

def neoon(opts = {})
  yield(neo_model_config) if block_given?

  opts.each do |key, value|
    raise "No such option #{key} for #{self.name} model" unless neo_model_config.respond_to?("#{key}=")
    neo_model_config.send("#{key}=", value)
  end
end