Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/updater/configuration.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#yaml ⇒ Object
readonly
Returns the value of attribute yaml.
Instance Method Summary collapse
-
#initialize(path:) ⇒ Configuration
constructor
A new instance of Configuration.
- #master_repo ⇒ Object
- #mirror ⇒ Object
- #podfiles ⇒ Object
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
#yaml ⇒ Object (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_repo ⇒ Object
12 13 14 |
# File 'lib/updater/configuration.rb', line 12 def master_repo @yaml['master_repo'] end |
#mirror ⇒ Object
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 |
#podfiles ⇒ Object
16 17 18 |
# File 'lib/updater/configuration.rb', line 16 def podfiles @yaml['podfiles'] end |