Class: LocalVault::KeyLookup::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/localvault/key_lookup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



3
4
5
# File 'lib/localvault/key_lookup.rb', line 3

def key
  @key
end

#matchesObject

Returns the value of attribute matches

Returns:

  • (Object)

    the current value of matches



3
4
5
# File 'lib/localvault/key_lookup.rb', line 3

def matches
  @matches
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



3
4
5
# File 'lib/localvault/key_lookup.rb', line 3

def value
  @value
end

Instance Method Details

#exact?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/localvault/key_lookup.rb', line 4

def exact?
  !value.nil?
end

#multiple_matches?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/localvault/key_lookup.rb', line 12

def multiple_matches?
  matches.size > 1
end

#single_match?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/localvault/key_lookup.rb', line 8

def single_match?
  matches.size == 1
end