Class: RubyOnSkis::AppGenerator
- Inherits:
-
Object
- Object
- RubyOnSkis::AppGenerator
- Includes:
- FileUtils
- Defined in:
- lib/ruby_on_skis/generator.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize ⇒ AppGenerator
constructor
A new instance of AppGenerator.
- #run ⇒ Object
Constructor Details
#initialize ⇒ AppGenerator
Returns a new instance of AppGenerator.
13 14 15 16 |
# File 'lib/ruby_on_skis/generator.rb', line 13 def initialize @options = OpenStruct.new .source_dir = File.(File.join(File.dirname(__FILE__), '..', '..', 'sources')) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/ruby_on_skis/generator.rb', line 11 def @options end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/ruby_on_skis/generator.rb', line 18 def run Dir.chdir .source_dir source_entries = Find.find(".") create_directories(source_entries) copy_files(source_entries) end |