Class: Templater::Actions::Action
- Inherits:
-
Object
- Object
- Templater::Actions::Action
- Defined in:
- lib/templater/actions/action.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#generator ⇒ Object
Returns the value of attribute generator.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#relative_destination ⇒ Object
Returns the destination path relative to Dir.pwd.
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
5 6 7 |
# File 'lib/templater/actions/action.rb', line 5 def destination @destination end |
#generator ⇒ Object
Returns the value of attribute generator.
5 6 7 |
# File 'lib/templater/actions/action.rb', line 5 def generator @generator end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/templater/actions/action.rb', line 5 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/templater/actions/action.rb', line 5 def @options end |
#source ⇒ Object
Returns the value of attribute source.
5 6 7 |
# File 'lib/templater/actions/action.rb', line 5 def source @source end |
Instance Method Details
#relative_destination ⇒ Object
Returns the destination path relative to Dir.pwd. This is useful for prettier output in interfaces where the destination root is Dir.pwd.
Returns
- String
-
The destination relative to Dir.pwd
24 25 26 |
# File 'lib/templater/actions/action.rb', line 24 def relative_destination @destination.relative_path_from(@generator.destination_root) end |