Class: Xanthus::Configuration
- Inherits:
-
Object
- Object
- Xanthus::Configuration
- Defined in:
- lib/xanthus/configuration.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#description ⇒ Object
Returns the value of attribute description.
-
#github_conf ⇒ Object
Returns the value of attribute github_conf.
-
#jobs ⇒ Object
Returns the value of attribute jobs.
-
#name ⇒ Object
Returns the value of attribute name.
-
#params ⇒ Object
Returns the value of attribute params.
-
#scripts ⇒ Object
Returns the value of attribute scripts.
-
#seed ⇒ Object
Returns the value of attribute seed.
-
#vms ⇒ Object
Returns the value of attribute vms.
Instance Method Summary collapse
- #github {|github| ... } ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #job(name) {|v| ... } ⇒ Object
- #script(name) ⇒ Object
- #to_readme_md ⇒ Object
- #vm(name) {|vm| ... } ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 |
# File 'lib/xanthus/configuration.rb', line 13 def initialize @params = Hash.new @vms = Hash.new @scripts = Hash.new @jobs = Hash.new end |
Instance Attribute Details
#authors ⇒ Object
Returns the value of attribute authors.
4 5 6 |
# File 'lib/xanthus/configuration.rb', line 4 def @authors end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/xanthus/configuration.rb', line 5 def description @description end |
#github_conf ⇒ Object
Returns the value of attribute github_conf.
11 12 13 |
# File 'lib/xanthus/configuration.rb', line 11 def github_conf @github_conf end |
#jobs ⇒ Object
Returns the value of attribute jobs.
10 11 12 |
# File 'lib/xanthus/configuration.rb', line 10 def jobs @jobs end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/xanthus/configuration.rb', line 3 def name @name end |
#params ⇒ Object
Returns the value of attribute params.
7 8 9 |
# File 'lib/xanthus/configuration.rb', line 7 def params @params end |
#scripts ⇒ Object
Returns the value of attribute scripts.
9 10 11 |
# File 'lib/xanthus/configuration.rb', line 9 def scripts @scripts end |
#seed ⇒ Object
Returns the value of attribute seed.
6 7 8 |
# File 'lib/xanthus/configuration.rb', line 6 def seed @seed end |
#vms ⇒ Object
Returns the value of attribute vms.
8 9 10 |
# File 'lib/xanthus/configuration.rb', line 8 def vms @vms end |
Instance Method Details
#github {|github| ... } ⇒ Object
38 39 40 41 42 |
# File 'lib/xanthus/configuration.rb', line 38 def github github = GitHub.new yield(github) @github_conf = github end |
#job(name) {|v| ... } ⇒ Object
31 32 33 34 35 36 |
# File 'lib/xanthus/configuration.rb', line 31 def job name v = Job.new yield(v) v.name = name @jobs[name] = v end |
#script(name) ⇒ Object
27 28 29 |
# File 'lib/xanthus/configuration.rb', line 27 def script name @scripts[name] = yield end |
#to_readme_md ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/xanthus/configuration.rb', line 44 def to_readme_md %Q{ # #{@name} Authors: #{@authors} Seed: #{@seed} ## Description #{@description} } end |
#vm(name) {|vm| ... } ⇒ Object
20 21 22 23 24 25 |
# File 'lib/xanthus/configuration.rb', line 20 def vm name vm = VirtualMachine.new yield(vm) vm.name = name @vms[name] = vm end |