Sha256: fface364be2f2e8a7ffa45b36598ab90037311583104f2a7732b9a848a4800f4

Contents?: true

Size: 988 Bytes

Versions: 9

Compression:

Stored size: 988 Bytes

Contents

require "n4j/version"
require 'active_support/all'
require 'active_model'
require 'n4j/railtie' if defined?(Rails)

module N4j
  autoload :Attributes,   'n4j/attributes'
  autoload :Request,      'n4j/request'
  autoload :Entity,       'n4j/entity'
  autoload :Node,         'n4j/node'
  autoload :Relationship, 'n4j/relationship'
  autoload :Field,        'n4j/field'
  autoload :Traversal,    'n4j/traversal'
  autoload :Cypher,       'n4j/cypher'

  include Request

  module Dummy
    extend ActiveSupport::Concern
    included do
    end
    module ClassMethods
    end
  end

end

class GenericNode
  include N4j::Entity
  include N4j::Node

end

class RootNode < GenericNode
  skip_callback :initialize, :after, :relate_to_root
end

class GenericRelationship
  include N4j::Entity
  include N4j::Relationship

  def self.find_by_node_path(path)
    result = N4j.batch([{:to => path ,:method => 'GET'}])
    result.first['body'].collect {|r| GenericRelationship.new(r) }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
n4j-0.0.1.7 lib/n4j.rb
n4j-0.0.1.6.3 lib/n4j.rb
n4j-0.0.1.6.1 lib/n4j.rb
n4j-0.0.1.6 lib/n4j.rb
n4j-0.0.1.5 lib/n4j.rb
n4j-0.0.1.4 lib/n4j.rb
n4j-0.0.1.3 lib/n4j.rb
n4j-0.0.1.2 lib/n4j.rb
n4j-0.0.1.1 lib/n4j.rb