Sha256: 15dc369569a7454eb1b8bd9cac6bace93e34e87ee64607cd5ebc233edadf38ab

Contents?: true

Size: 757 Bytes

Versions: 1

Compression:

Stored size: 757 Bytes

Contents

module Evertils
  module Common
    module Manager
      class Notebook < Manager::Base
        #
        # @since 0.3.0
        def create(name, stack = nil)
          entity = Evertils::Common::Entity::Notebook.new
          entity.create(name, stack)
          entity
        end

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

        #
        # @since 0.3.0
        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/notebook.rb