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.



8
9
10
# File 'lib/drumknott/keys.rb', line 8

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

Class Method Details

.call(arguments) ⇒ Object



4
5
6
# File 'lib/drumknott/keys.rb', line 4

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

Instance Method Details

#callObject



12
13
14
15
16
17
18
# File 'lib/drumknott/keys.rb', line 12

def call
  File.write ".drumknott", JSON.generate(
    "name"  => name,
    "key"   => key,
    "pages" => Drumknott::IncludePages.call(pages)
  )
end