Class: Templater::Actions::Touch

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

Instance Method Summary (collapse)

Constructor Details

- (Touch) initialize(generator, destination, options = {})

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

- (Boolean) exists?

Returns:

  • (Boolean)


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

def exists?
  false
end

- (Boolean) identical?

Returns:

  • (Boolean)


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

def identical?
  false
end

- (Object) invoke!



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

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

- (Object) render



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

def render
  ''
end