Class: Drumknott::Keys

Inherits:
Object
  • Object
show all
Defined in:
lib/drumknott/keys.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arguments) ⇒ Keys

Returns a new instance of Keys.



6
7
8
# File 'lib/drumknott/keys.rb', line 6

def initialize(arguments)
  @name, @key, ignored = *arguments
end

Class Method Details

.call(arguments) ⇒ Object



2
3
4
# File 'lib/drumknott/keys.rb', line 2

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

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/drumknott/keys.rb', line 10

def call
  File.write '.drumknott', JSON.generate(
    'name' => name,
    'key'  => key
  )
end