Class: Dato::Dump::Operation::Root

Inherits:
Object
  • Object
show all
Defined in:
lib/dato/dump/operation/root.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Root

Returns a new instance of Root.



9
10
11
12
# File 'lib/dato/dump/operation/root.rb', line 9

def initialize(path)
  @operations = []
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/dato/dump/operation/root.rb', line 7

def path
  @path
end

Instance Method Details

#add(operation) ⇒ Object



14
15
16
# File 'lib/dato/dump/operation/root.rb', line 14

def add(operation)
  @operations << operation
end

#performObject



18
19
20
# File 'lib/dato/dump/operation/root.rb', line 18

def perform
  operations.each(&:perform)
end