Sha256: d5c88e542b7b16fd2d0f75f3faaaf80c71a0036873d331a6702550cfd87c8733

Contents?: true

Size: 518 Bytes

Versions: 11

Compression:

Stored size: 518 Bytes

Contents

module Scrivito
#
# This class represents a collection of meta data attributes.
#
# @api beta
#
class MetaDataCollection
  def initialize(attributes)
    @attributes = ActiveSupport::HashWithIndifferentAccess.new(attributes)
  end

  #
  # Find value of a meta data attribute.
  #
  # @api beta
  # @param name [Symbol, String] the name of the meta data attribute.
  # @return [String, Array, Fixnum, Date, nil] meta data attribute value if found or +nil+ otherwise.
  def [](name)
    @attributes[name]
  end
end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
scrivito_sdk-0.70.2 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.71.2 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.71.1 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.70.1 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.71.0 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.71.0.rc2 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.71.0.rc1 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.70.0 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.70.0.rc3 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.70.0.rc2 lib/scrivito/meta_data_collection.rb
scrivito_sdk-0.70.0.rc1 lib/scrivito/meta_data_collection.rb