Class: CagnutSamtools::Configuration
- Inherits:
-
Object
- Object
- CagnutSamtools::Configuration
- Includes:
- Singleton
- Defined in:
- lib/cagnut_samtools/configuration.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#samtools_path ⇒ Object
Returns the value of attribute samtools_path.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/cagnut_samtools/configuration.rb', line 8 def config @config end |
#samtools_path ⇒ Object
Returns the value of attribute samtools_path.
7 8 9 |
# File 'lib/cagnut_samtools/configuration.rb', line 7 def samtools_path @samtools_path end |
Class Method Details
.load(config, params) ⇒ Object
11 12 13 |
# File 'lib/cagnut_samtools/configuration.rb', line 11 def load config, params instance.load config, params end |
Instance Method Details
#attributes ⇒ Object
23 24 25 26 27 |
# File 'lib/cagnut_samtools/configuration.rb', line 23 def attributes { samtools_path: @config['tools']['samtools'] } end |
#load(config, params = nil) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/cagnut_samtools/configuration.rb', line 16 def load config, params = nil @config = config attributes.each do |name, value| send "#{name}=", value if respond_to? "#{name}=" end end |