Class: RSpec::Swag::ProjectInitializer

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/swag/project_initializer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProjectInitializer

Returns a new instance of ProjectInitializer.



10
11
12
13
# File 'lib/rspec/swag/project_initializer.rb', line 10

def initialize
  @destination = Dir.pwd
  @source = File.expand_path("templates", __dir__)
end

Instance Attribute Details

#destinationObject (readonly)

Returns the value of attribute destination.



8
9
10
# File 'lib/rspec/swag/project_initializer.rb', line 8

def destination
  @destination
end

#sourceObject (readonly)

Returns the value of attribute source.



8
9
10
# File 'lib/rspec/swag/project_initializer.rb', line 8

def source
  @source
end

Instance Method Details

#runObject



15
16
17
# File 'lib/rspec/swag/project_initializer.rb', line 15

def run
  copy_template "spec/swagger_helper.rb"
end