Class: YamlSmith::FileCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/yaml_smith/file_command.rb

Overview

Provides shared YAML file editing behavior for commands.

Direct Known Subclasses

AddKey, DeleteKey, SetKey

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, key, value = nil) ⇒ FileCommand

Returns a new instance of FileCommand.



6
7
8
9
10
# File 'lib/yaml_smith/file_command.rb', line 6

def initialize(path, key, value = nil)
  @path = path
  @key = key
  @value = value
end

Class Method Details

.callObject



12
13
14
# File 'lib/yaml_smith/file_command.rb', line 12

def self.call(...)
  new(...).call
end