Class: Terraspace::Seeder::Actions

Inherits:
Object
  • Object
show all
Includes:
Thor::Actions, Thor::Base
Defined in:
lib/terraspace/seeder/actions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Actions

Override Thor::Base initialize to set destination_root



17
18
19
20
21
22
# File 'lib/terraspace/seeder/actions.rb', line 17

def initialize(options={})
  # Thor::Base.initialize(args = [], local_options = {}, config = {}) <= original signature
  options[:force] = options[:yes]
  super([], options)
  self.destination_root = Dir.pwd # Thor::Actions require destination_root to be set
end

Instance Attribute Details

#optionsObject (readonly)

Thor requires options



15
16
17
# File 'lib/terraspace/seeder/actions.rb', line 15

def options
  @options
end