Class: Evertils::Common::Manager::Notebook
- Inherits:
-
Base
- Object
- Generic
- Base
- Evertils::Common::Manager::Notebook
show all
- Includes:
- Singleton
- Defined in:
- lib/evertils/common/manager/notebook.rb
Overview
Instance Method Summary
collapse
Methods inherited from Generic
#bytesize, #deprecation_notice, #encoding, #force_encoding, #has_required_fields, #initialize
Instance Method Details
#create(name, stack = nil) ⇒ Object
11
12
13
14
15
|
# File 'lib/evertils/common/manager/notebook.rb', line 11
def create(name, stack = nil)
entity = Evertils::Common::Entity::Notebook.new
entity.create(name, stack)
entity
end
|
#find(name) ⇒ Object
19
20
21
22
23
|
# File 'lib/evertils/common/manager/notebook.rb', line 19
def find(name)
entity = Evertils::Common::Entity::Notebook.new
entity.find(name)
entity
end
|
#find_or_create(name, stack = nil) ⇒ Object
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/evertils/common/manager/notebook.rb', line 27
def find_or_create(name, stack = nil)
search_result = find(name)
if !search_result
note = create(name, stack)
else
note = search_result
end
note
end
|