Object
# File lib/templater/actions/action.rb, line 13 13: def destination=(destination) 14: unless destination.blank? 15: @destination = ::File.expand_path(convert_encoded_instructions(destination), generator.destination_root) 16: end 17: end
Returns the destination path relative to Dir.pwd. This is useful for prettier output in interfaces where the destination root is Dir.pwd.
String | The destination relative to Dir.pwd |
# File lib/templater/actions/action.rb, line 24 24: def relative_destination 25: @destination.relative_path_from(@generator.destination_root) 26: end
# File lib/templater/actions/action.rb, line 30 30: def callback(name) 31: @generator.send(@options[name], self) if @options[name] 32: end
# File lib/templater/actions/action.rb, line 34 34: def convert_encoded_instructions(filename) 35: filename.gsub(/%.*?%/) do |string| 36: instruction = string.match(/%(.*?)%/)[1] 37: @generator.respond_to?(instruction) ? @generator.send(instruction) : string 38: end 39: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.