Sha256: f9cdb02f06b752a888c747c6d5caa83b006497214283694e76986f066666b774

Contents?: true

Size: 286 Bytes

Versions: 3

Compression:

Stored size: 286 Bytes

Contents

module TFA
  class AddCommand
    def initialize(storage)
      @storage = storage
    end

    def run(arguments)
      name = arguments.first
      secret = arguments.last
      @storage.transaction do
        @storage[name] = secret
      end
      "Added #{name}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tfa-0.0.3 lib/tfa/add_command.rb
tfa-0.0.2 lib/tfa/add_command.rb
tfa-0.0.1 lib/tfa/add_command.rb