Class: Evertils::Common::Manager::Note

Inherits:
Base show all
Includes:
Singleton
Defined in:
lib/evertils/common/manager/note.rb

Overview

Since:

  • 0.3.0

Instance Method Summary collapse

Methods inherited from Generic

#bytesize, #deprecation_notice, #encoding, #force_encoding, #has_required_fields, #initialize

Constructor Details

This class inherits a constructor from Evertils::Common::Generic

Instance Method Details

#create(config) ⇒ Object

Since:

  • 0.3.0



11
12
13
14
15
# File 'lib/evertils/common/manager/note.rb', line 11

def create(config)
  entity = Evertils::Common::Entity::Note.new
  entity.create(config)
  entity
end

#find(name) ⇒ Object

Since:

  • 0.3.0



19
20
21
22
23
# File 'lib/evertils/common/manager/note.rb', line 19

def find(name)
  entity = Evertils::Common::Entity::Note.new
  entity.find(name)
  entity
end

#find_note_contents_using_grammar(grammar) ⇒ Object

Since:

  • 0.3.18



43
44
45
46
47
# File 'lib/evertils/common/manager/note.rb', line 43

def find_note_contents_using_grammar(grammar)
  entity = Evertils::Common::Entity::Note.new
  entity.find_note_contents_using_grammar(grammar)
  entity
end

#find_or_create(name, stack = nil) ⇒ Object

Since:

  • 0.3.1



51
52
53
54
55
56
57
58
59
60
61
# File 'lib/evertils/common/manager/note.rb', line 51

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

#find_with(conf) ⇒ Object

Since:

  • 0.3.13



27
28
29
30
31
# File 'lib/evertils/common/manager/note.rb', line 27

def find_with(conf)
  entity = Evertils::Common::Entity::Note.new
  entity.find_with(conf)
  entity
end

#find_with_contents(name) ⇒ Object

Since:

  • 0.3.0



35
36
37
38
39
# File 'lib/evertils/common/manager/note.rb', line 35

def find_with_contents(name)
  entity = Evertils::Common::Entity::Note.new
  entity.find_with_contents(name)
  entity
end