Sha256: 371b5e372d3a9ddfe19af86a49f1574e95757d4f240662297860341c89a344d1

Contents?: true

Size: 973 Bytes

Versions: 11

Compression:

Stored size: 973 Bytes

Contents

require "singleton"

module Evertils
  module Common
    module Manager
      class Note < Manager::Base
        include Singleton

        #
        # @since 0.3.0
        def create(config)
          entity = Evertils::Common::Entity::Note.new
          entity.create(config)
          entity
        end

        #
        # @since 0.3.0
        def find(name)
          entity = Evertils::Common::Entity::Note.new
          entity.find(name)
          entity
        end

        #
        # @since 0.3.0
        def find_with_contents(name)
          entity = Evertils::Common::Entity::Note.new
          entity.find_with_contents(name)
          entity
        end

        #
        # @since 0.3.1
        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
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
evertils-common-0.3.12 lib/evertils/common/manager/note.rb
evertils-common-0.3.11 lib/evertils/common/manager/note.rb
evertils-common-0.3.10 lib/evertils/common/manager/note.rb
evertils-common-0.3.9 lib/evertils/common/manager/note.rb
evertils-common-0.3.8 lib/evertils/common/manager/note.rb
evertils-common-0.3.7 lib/evertils/common/manager/note.rb
evertils-common-0.3.6 lib/evertils/common/manager/note.rb
evertils-common-0.3.5 lib/evertils/common/manager/note.rb
evertils-common-0.3.4.1 lib/evertils/common/manager/note.rb
evertils-common-0.3.4 lib/evertils/common/manager/note.rb
evertils-common-0.3.4.1.pre.dev lib/evertils/common/manager/note.rb