Class: CIAgainst::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/ci_against/converter.rb

Constant Summary collapse

LATEST_RUBIES =
%w[
  2.6.5
  2.5.7
  2.4.9
  2.3.8
  2.2.10
  2.1.10
]
VERSION_REGEXP =
/\d+\.\d+\.\d+/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(yml_string) ⇒ Converter

Returns a new instance of Converter.



15
16
17
18
19
20
21
# File 'lib/ci_against/converter.rb', line 15

def initialize(yml_string)
  @yml = TravisYML.new(yml_string)
  @log = {
    changed: [],
    added: [],
  }
end

Instance Attribute Details

#logObject (readonly)

Returns the value of attribute log.



13
14
15
# File 'lib/ci_against/converter.rb', line 13

def log
  @log
end

Instance Method Details

#convertObject



23
24
25
26
27
# File 'lib/ci_against/converter.rb', line 23

def convert
  update_to_latest_rubies
  insert_new_rubies
  @yml.code
end