Class: DayoneToolbox::API::SearchEntryByTag
- Inherits:
-
Base
- Object
- Base
- DayoneToolbox::API::SearchEntryByTag
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
Instance Method Details
#exec ⇒ Object
49
50
51
52
53
54
55
56
|
# File 'lib/dayone_toolbox/api.rb', line 49
def exec
if @options[:include]
@result = tag_include?
elsif @options[:not]
@result = tag_not_include?
end
self
end
|
#tag_include? ⇒ Boolean
41
42
43
|
# File 'lib/dayone_toolbox/api.rb', line 41
def tag_include?
@entry.tags.include?(@options[:include])
end
|
#tag_not_include? ⇒ Boolean
45
46
47
|
# File 'lib/dayone_toolbox/api.rb', line 45
def tag_not_include?
! @entry.tags.include?(@options[:not])
end
|