Class: Muxify::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/muxify/builder.rb

Defined Under Namespace

Classes: Windows

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, name: nil, custom_config_path: CUSTOM_CONFIG_PATH) ⇒ Builder

Returns a new instance of Builder.



14
15
16
17
18
# File 'lib/muxify/builder.rb', line 14

def initialize(root, name: nil, custom_config_path: CUSTOM_CONFIG_PATH)
  @root = File.expand_path(root)
  @name = name || File.basename(@root)
  @custom_config_path = custom_config_path
end

Class Method Details

.call(*args) ⇒ Object



10
11
12
# File 'lib/muxify/builder.rb', line 10

def self.call(*args)
  new(*args).to_yaml
end

Instance Method Details

#to_yamlObject



20
21
22
# File 'lib/muxify/builder.rb', line 20

def to_yaml
  config.to_yaml
end