Class: Adopter::Migrator

Inherits:
Object
  • Object
show all
Defined in:
lib/adopter/migrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(plan) ⇒ Migrator

Returns a new instance of Migrator.



11
12
13
14
# File 'lib/adopter/migrator.rb', line 11

def initialize(plan)
  @plan = plan
  @results = { pages: 0, tests: 0, features: 0, steps: 0, errors: [] }
end

Instance Attribute Details

#planObject (readonly)

Returns the value of attribute plan.



9
10
11
# File 'lib/adopter/migrator.rb', line 9

def plan
  @plan
end

#resultsObject (readonly)

Returns the value of attribute results.



9
10
11
# File 'lib/adopter/migrator.rb', line 9

def results
  @results
end

Instance Method Details

#executeObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/adopter/migrator.rb', line 16

def execute
  generate_skeleton
  write_converted_pages
  write_converted_tests
  write_converted_features
  write_converted_steps
  merge_gemfile
  apply_config_overrides
  results
end