lib/keylime/credential.rb in keylime-0.2.0 vs lib/keylime/credential.rb in keylime-0.2.1
- old
+ new
@@ -84,11 +84,11 @@
end
def where(fields = {})
fields = stringify(fields)
entries.select do |x|
- fields.all? { |k, v| x[k] == v }
+ fields.all? { |k, v| x.fields[k] == v }
end
end
def create(fields = {})
raise('No fields given') if fields.empty?
@@ -101,10 +101,10 @@
def delete(fields = {})
raise('No fields given') if fields.empty?
fields = stringify(fields)
new = entries.select do |x|
- fields.any? { |k, v| x[k] != v }
+ fields.any? { |k, v| x.fields[k] != v }
end
write_file! new
end
private