Class: Rukawa::Configuration

Inherits:
Delegator
  • Object
show all
Includes:
Singleton
Defined in:
lib/rukawa/configuration.rb

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_attrsObject



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