Class: DayoneToolbox::API::SearchEntry

Inherits:
Base
  • Object
show all
Defined in:
lib/dayone_toolbox/api.rb

Instance Attribute Summary

Attributes inherited from Base

#cli_exit_code, #entry, #result

Instance Method Summary collapse

Methods inherited from Base

#initialize, #store

Constructor Details

This class inherits a constructor from DayoneToolbox::API::Base

Instance Method Details

#execObject



33
34
35
36
# File 'lib/dayone_toolbox/api.rb', line 33

def exec
  @result = plist_options < @entry.to_h
  self
end

#plist_optionsObject



25
26
27
28
29
30
31
# File 'lib/dayone_toolbox/api.rb', line 25

def plist_options
  new_options = {}
  @options.map do |k, v|
    new_options.merge!(DayoneToolbox::Entry.entry_attributes[k] => v)
  end
  new_options
end