Class: Munge::WriteManager::All

Inherits:
Object
  • Object
show all
Defined in:
lib/munge/write_manager/all.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vfs) ⇒ All

Returns a new instance of All.



4
5
6
7
# File 'lib/munge/write_manager/all.rb', line 4

def initialize(vfs)
  @vfs = vfs
  @written_routes = []
end

Instance Attribute Details

#written_routesObject (readonly)

Returns the value of attribute written_routes.



9
10
11
# File 'lib/munge/write_manager/all.rb', line 9

def written_routes
  @written_routes
end

Instance Method Details

#on_changed(_route, relpath, content) ⇒ Object



16
17
18
19
# File 'lib/munge/write_manager/all.rb', line 16

def on_changed(_route, relpath, content)
  @vfs.write(relpath, content)
  @written_routes.push(relpath)
end

#on_identical(_route, relpath, content) ⇒ Object



21
22
23
24
# File 'lib/munge/write_manager/all.rb', line 21

def on_identical(_route, relpath, content)
  @vfs.write(relpath, content)
  @written_routes.push(relpath)
end

#on_new(_route, relpath, content) ⇒ Object



11
12
13
14
# File 'lib/munge/write_manager/all.rb', line 11

def on_new(_route, relpath, content)
  @vfs.write(relpath, content)
  @written_routes.push(relpath)
end