Class: Ing::Generator

Inherits:
Task
  • Object
show all
Includes:
Files
Defined in:
lib/ing/generator.rb

Direct Known Subclasses

Commands::Setup

Instance Attribute Summary

Attributes inherited from Task

#options, #shell

Instance Method Summary collapse

Methods included from Files

#action, #append_to_file, #chmod, #comment_lines, #copy_file, #create_file, #create_link, #current_destination, #directory, #empty_directory, #find_in_source_paths, #force?, #get, #gsub_file, #in_root, #inject_into_class, #insert_into_file, #inside, #link_file, #prepend_to_file, #pretend?, #quiet?, #relative_to_original_destination_root, #remove_file, #revoke?, #skip?, #template, #uncomment_lines, #verbose?

Methods inherited from Task

all_options, #ask_unless_given, #ask_unless_given!, default, desc, desc_lines, inherited, inherited_option?, #initial_options, modify_option, opt, option?, options, specify_options, usage, usage_lines, #validate_option, #validate_option_exists

Constructor Details

#initialize(options) ⇒ Generator

Returns a new instance of Generator.



26
27
28
29
30
# File 'lib/ing/generator.rb', line 26

def initialize(options)
  super
  validate_option_exists :dest, 'destination_root'
  validate_option_exists :source, 'source_root'
end

Instance Method Details

#destination_rootObject

Destination root for filesystem actions



17
18
19
# File 'lib/ing/generator.rb', line 17

def destination_root
  File.expand_path(options[:dest])
end

#source_rootObject

Source root for filesystem actions



22
23
24
# File 'lib/ing/generator.rb', line 22

def source_root
  File.expand_path(options[:source])
end