Sha256: ce1c26474e32415366ee39792aa1f75ce8dedf4b8169839adf6788c79807565f

Contents?: true

Size: 541 Bytes

Versions: 6

Compression:

Stored size: 541 Bytes

Contents

module Vedeu

  # Repository helper module which reduces duplication in Offsets and Cursors.
  #
  module Positional

    # Add or update the offset or cursor coordinates.
    #
    # @param attributes [Hash]
    # @return [Offset]
    def add(attributes)
      validate_attributes!(attributes)

      Vedeu.log("#{action(__callee__)} positional (#{entity}): " \
                "'#{attributes[:name]}'")

      storage.store(attributes[:name], entity.new(attributes))
    end
    alias_method :update, :add

  end # Positional

end # Vedeu

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.2.10 lib/vedeu/repositories/positional.rb
vedeu-0.2.9 lib/vedeu/repositories/positional.rb
vedeu-0.2.8 lib/vedeu/repositories/positional.rb
vedeu-0.2.7 lib/vedeu/repositories/positional.rb
vedeu-0.2.6 lib/vedeu/repositories/positional.rb
vedeu-0.2.5 lib/vedeu/repositories/positional.rb