Class: Neography::Composable::BatchReference

Inherits:
Object
  • Object
show all
Defined in:
lib/neography-batch/batch_reference.rb

Instance Method Summary collapse

Constructor Details

#initialize(command) ⇒ BatchReference

Returns a new instance of BatchReference.



6
7
8
# File 'lib/neography-batch/batch_reference.rb', line 6

def initialize(command)
  @command = command
end

Instance Method Details

#==(other) ⇒ Object



30
31
32
33
34
# File 'lib/neography-batch/batch_reference.rb', line 30

def ==(other)
  return false if other.nil?
  @after_submit_action.equal?(other.after_submit_action) &&
      @command.equal?(other.command)
end

#after_submit(&after_commit_action) ⇒ Object



20
21
22
# File 'lib/neography-batch/batch_reference.rb', line 20

def after_submit(&after_commit_action)
  @after_submit_action = after_commit_action
end

#notify_after_submit(result) ⇒ Object



24
25
26
27
28
# File 'lib/neography-batch/batch_reference.rb', line 24

def notify_after_submit(result)
  unless @after_submit_action.nil?
    NeographyContext.new(&@after_submit_action).eval(result)
  end
end