Class: Dotman::DotfileConfiguration
- Inherits:
-
Object
- Object
- Dotman::DotfileConfiguration
- Defined in:
- lib/dotman/dotfile_configuration.rb
Instance Method Summary collapse
- #alias_host(from, to) ⇒ Object
-
#initialize ⇒ DotfileConfiguration
constructor
A new instance of DotfileConfiguration.
- #link(from, to: nil, **args) ⇒ Object
- #to_script(env) ⇒ Object
Constructor Details
#initialize ⇒ DotfileConfiguration
Returns a new instance of DotfileConfiguration.
3 4 5 6 |
# File 'lib/dotman/dotfile_configuration.rb', line 3 def initialize @actions = [] @host_aliases = {} end |
Instance Method Details
#alias_host(from, to) ⇒ Object
16 17 18 |
# File 'lib/dotman/dotfile_configuration.rb', line 16 def alias_host(from, to) @host_aliases[from] = to end |
#link(from, to: nil, **args) ⇒ Object
8 9 10 |
# File 'lib/dotman/dotfile_configuration.rb', line 8 def link(from, to: nil, **args) add_action(Action::Link.new(from, to), args) end |
#to_script(env) ⇒ Object
12 13 14 |
# File 'lib/dotman/dotfile_configuration.rb', line 12 def to_script(env) [header(env), actions, ].join end |