Class: Templater::Actions::Touch

Inherits:
Action
  • Object
show all
Defined in:
lib/bowline/generators.rb

Instance Method Summary collapse

Constructor Details

#initialize(generator, destination, options = {}) ⇒ Touch

Returns a new instance of Touch.



9
10
11
12
13
# File 'lib/bowline/generators.rb', line 9

def initialize(generator, destination, options={})
  self.generator   = generator
  self.destination = destination
  self.options     = options
end

Instance Method Details

#exists?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/bowline/generators.rb', line 19

def exists?
  false
end

#identical?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/bowline/generators.rb', line 23

def identical?
  false
end

#invoke!Object



27
28
29
30
31
# File 'lib/bowline/generators.rb', line 27

def invoke!
  callback(:before)
  ::FileUtils.touch(destination)
  callback(:after)
end

#renderObject



15
16
17
# File 'lib/bowline/generators.rb', line 15

def render
  ''
end