Class: Drumknott::Keys
- Inherits:
-
Object
- Object
- Drumknott::Keys
- Defined in:
- lib/drumknott/keys.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(arguments) ⇒ Keys
constructor
A new instance of Keys.
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
#call ⇒ Object
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 |