Sha256: 0fc88f7409e8bb21d6ae699a06638c82e3b09279dc57543536970043ad87c187

Contents?: true

Size: 281 Bytes

Versions: 26

Compression:

Stored size: 281 Bytes

Contents

require File.join(File.dirname(__FILE__), "key")
class KeySet < Array
  include Octopi
  def find(title)
    key = detect { |key| key.title == title }
    raise NotFound, Key if key.nil?
    key
  end
  
  def add(options={})
    ensure_hash(options)
    Key.add(options)
  end
end

Version data entries

26 entries across 26 versions & 4 rubygems

Version Path
octopi-0.4.5 lib/octopi/key_set.rb
octopi-0.4.4 lib/octopi/key_set.rb
octopi-0.4.3 lib/octopi/key_set.rb
octopi-0.4.2 lib/octopi/key_set.rb
octopi-0.4.1 lib/octopi/key_set.rb
octopi-0.4.0 lib/octopi/key_set.rb
octopi-0.3.0 lib/octopi/key_set.rb
dcuddeback-octopi-0.2.12 lib/octopi/key_set.rb
dcuddeback-octopi-0.2.11 lib/octopi/key_set.rb
dcuddeback-octopi-0.2.9 lib/octopi/key_set.rb
dcuddeback-octopi-0.2.8 lib/octopi/key_set.rb
devver-octopi-0.2.14 lib/octopi/key_set.rb
tpitale-octopi-0.3.0 lib/octopi/key_set.rb
devver-octopi-0.2.13 lib/octopi/key_set.rb
devver-octopi-0.2.12 lib/octopi/key_set.rb
octopi-0.2.8 lib/octopi/key_set.rb
devver-octopi-0.2.11 lib/octopi/key_set.rb
devver-octopi-0.2.10 lib/octopi/key_set.rb
devver-octopi-0.2.9 lib/octopi/key_set.rb
devver-octopi-0.2.8 lib/octopi/key_set.rb