Class: Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/updater/configuration.rb

Defined Under Namespace

Classes: Github, Mirror

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:) ⇒ Configuration

Returns a new instance of Configuration.



8
9
10
# File 'lib/updater/configuration.rb', line 8

def initialize(path:)
  @yaml = YAML.load_file(path)
end

Instance Attribute Details

#yamlObject (readonly)

Returns the value of attribute yaml.



4
5
6
# File 'lib/updater/configuration.rb', line 4

def yaml
  @yaml
end

Instance Method Details

#master_repoObject



12
13
14
# File 'lib/updater/configuration.rb', line 12

def master_repo
  @yaml['master_repo']
end

#mirrorObject



20
21
22
23
24
25
26
27
# File 'lib/updater/configuration.rb', line 20

def mirror
  context = @yaml['mirror']
  Mirror.new(
    context['specs_push_url'],
    context['source_push_url'],
    context['source_clone_url'],
    github)
end

#podfilesObject



16
17
18
# File 'lib/updater/configuration.rb', line 16

def podfiles
  @yaml['podfiles']
end