Class: Xanthus::Configuration
- Inherits:
-
Object
- Object
- Xanthus::Configuration
- Defined in:
- lib/xanthus/configuration.rb
Instance Attribute Summary collapse
-
#affiliation ⇒ Object
Returns the value of attribute affiliation.
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#dataverse_conf ⇒ Object
Returns the value of attribute dataverse_conf.
-
#description ⇒ Object
Returns the value of attribute description.
-
#email ⇒ Object
Returns the value of attribute email.
-
#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
- #dataverse {|dataverse| ... } ⇒ Object
- #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.
16 17 18 19 20 21 |
# File 'lib/xanthus/configuration.rb', line 16 def initialize @params = Hash.new @vms = Hash.new @scripts = Hash.new @jobs = Hash.new end |
Instance Attribute Details
#affiliation ⇒ Object
Returns the value of attribute affiliation.
5 6 7 |
# File 'lib/xanthus/configuration.rb', line 5 def affiliation @affiliation end |
#authors ⇒ Object
Returns the value of attribute authors.
4 5 6 |
# File 'lib/xanthus/configuration.rb', line 4 def end |
#dataverse_conf ⇒ Object
Returns the value of attribute dataverse_conf.
14 15 16 |
# File 'lib/xanthus/configuration.rb', line 14 def dataverse_conf @dataverse_conf end |
#description ⇒ Object
Returns the value of attribute description.
7 8 9 |
# File 'lib/xanthus/configuration.rb', line 7 def description @description end |
#email ⇒ Object
Returns the value of attribute email.
6 7 8 |
# File 'lib/xanthus/configuration.rb', line 6 def email @email end |
#github_conf ⇒ Object
Returns the value of attribute github_conf.
13 14 15 |
# File 'lib/xanthus/configuration.rb', line 13 def github_conf @github_conf end |
#jobs ⇒ Object
Returns the value of attribute jobs.
12 13 14 |
# File 'lib/xanthus/configuration.rb', line 12 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.
9 10 11 |
# File 'lib/xanthus/configuration.rb', line 9 def params @params end |
#scripts ⇒ Object
Returns the value of attribute scripts.
11 12 13 |
# File 'lib/xanthus/configuration.rb', line 11 def scripts @scripts end |
#seed ⇒ Object
Returns the value of attribute seed.
8 9 10 |
# File 'lib/xanthus/configuration.rb', line 8 def seed @seed end |
#vms ⇒ Object
Returns the value of attribute vms.
10 11 12 |
# File 'lib/xanthus/configuration.rb', line 10 def vms @vms end |
Instance Method Details
#dataverse {|dataverse| ... } ⇒ Object
47 48 49 50 51 |
# File 'lib/xanthus/configuration.rb', line 47 def dataverse dataverse = Dataverse.new yield(dataverse) @dataverse_conf = dataverse end |
#github {|github| ... } ⇒ Object
41 42 43 44 45 |
# File 'lib/xanthus/configuration.rb', line 41 def github github = GitHub.new yield(github) @github_conf = github end |
#job(name) {|v| ... } ⇒ Object
34 35 36 37 38 39 |
# File 'lib/xanthus/configuration.rb', line 34 def job name v = Job.new yield(v) v.name = name @jobs[name] = v end |
#script(name) ⇒ Object
30 31 32 |
# File 'lib/xanthus/configuration.rb', line 30 def script name @scripts[name] = yield end |
#to_readme_md ⇒ Object
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/xanthus/configuration.rb', line 53 def to_readme_md %Q{ # #{@name} authors: #{@authors} affiliation: #{@affiliation} email: #{@email} seed: #{@seed} ## Description #{@description} } end |
#vm(name) {|vm| ... } ⇒ Object
23 24 25 26 27 28 |
# File 'lib/xanthus/configuration.rb', line 23 def vm name vm = VirtualMachine.new yield(vm) vm.name = name @vms[name] = vm end |