Class: KeySet

Inherits:
Array
  • Object
show all
Includes:
Octopi
Defined in:
lib/octopi/key_set.rb

Constant Summary

Constant Summary

Constants included from Octopi

Octopi::VERSION

Instance Method Summary collapse

Methods included from Octopi

#authenticated, #authenticated_with

Instance Method Details

#add(options = {}) ⇒ Object



10
11
12
13
# File 'lib/octopi/key_set.rb', line 10

def add(options={})
  ensure_hash(options)
  Key.add(options)
end

#find(title) ⇒ Object

Raises:



4
5
6
7
8
# File 'lib/octopi/key_set.rb', line 4

def find(title)
  key = detect { |key| key.title == title }
  raise NotFound, Key if key.nil?
  key
end