Class: Templater::Actions::Chmod
- Defined in:
- lib/bowline/generators.rb
Overview
Touch
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
Instance Method Summary collapse
- #exists? ⇒ Boolean
- #identical? ⇒ Boolean
-
#initialize(generator, destination, options = {}) ⇒ Chmod
constructor
A new instance of Chmod.
- #invoke! ⇒ Object
- #render ⇒ Object
Constructor Details
#initialize(generator, destination, options = {}) ⇒ Chmod
Returns a new instance of Chmod.
39 40 41 42 43 44 |
# File 'lib/bowline/generators.rb', line 39 def initialize(generator, destination, ={}) self.generator = generator self.destination = destination self. = self.mode = self.[:mode] || 0755 end |
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode.
37 38 39 |
# File 'lib/bowline/generators.rb', line 37 def mode @mode end |
Instance Method Details
#exists? ⇒ Boolean
50 51 52 |
# File 'lib/bowline/generators.rb', line 50 def exists? false end |
#identical? ⇒ Boolean
54 55 56 |
# File 'lib/bowline/generators.rb', line 54 def identical? false end |
#invoke! ⇒ Object
58 59 60 61 62 |
# File 'lib/bowline/generators.rb', line 58 def invoke! callback(:before) ::FileUtils.chmod_R(self.mode, destination) callback(:after) end |
#render ⇒ Object
46 47 48 |
# File 'lib/bowline/generators.rb', line 46 def render '' end |