Class: Rukawa::Configuration
- Inherits:
-
Delegator
- Object
- Delegator
- Rukawa::Configuration
- Includes:
- Singleton
- Defined in:
- lib/rukawa/configuration.rb
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #graph_attrs ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rukawa/configuration.rb', line 10 def initialize @config = OpenStruct.new( concurrency: Concurrent.processor_count, dot_command: "dot", job_dirs: [File.join(Dir.pwd, "job_nets"), File.join(Dir.pwd, "jobs")], status_store: nil, status_expire_duration: 24 * 60 * 60, logger: Logger.new('./rukawa.log') ) @config.graph = GraphConfig.new.tap { |c| c.rankdir = "LR" } end |
Instance Method Details
#__getobj__ ⇒ Object
22 23 24 |
# File 'lib/rukawa/configuration.rb', line 22 def __getobj__ @config end |
#graph_attrs ⇒ Object
26 27 28 29 |
# File 'lib/rukawa/configuration.rb', line 26 def graph_attrs if @config.graph.rankdir || @config.graph.size || @config.graph end end |