Sha256: 6175fb2f73cc4fbde383cb3dde1f4bf985a39583333bf6c9daed9362c935ff27

Contents?: true

Size: 824 Bytes

Versions: 1

Compression:

Stored size: 824 Bytes

Contents

module Evertils
  module Common
    module Manager
      class Note < Manager::Base
        #
        # @since 0.3.0
        def create(config)
          entity = Evertils::Common::Entity::Note.new
          entity.create(config[:name], config[:body], config[:notebook], config[:files], config[:shared], config[:created_on])
          entity
        end

        #
        # @since 0.3.0
        def find(name)
          entity = Evertils::Common::Entity::Note.new
          entity.find(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

1 entries across 1 versions & 1 rubygems

Version Path
evertils-common-0.3.2 lib/evertils/common/manager/note.rb