Sha256: e0a39041cff3e2e3c240ef997e2b2187477f45264e467541d4bb4c3cdedebcb6
Contents?: true
Size: 542 Bytes
Versions: 43
Compression:
Stored size: 542 Bytes
Contents
require_relative 'base_resource' require_relative 'locale' module Contentful # Resource class for Space. # https://www.contentful.com/developers/documentation/content-delivery-api/#spaces class Space < BaseResource attr_reader :name, :locales def initialize(item, *) super @name = item.fetch('name', nil) @locales = item.fetch('locales', []).map { |locale| Locale.new(locale) } end # @private def reload(client = nil) return client.space unless client.nil? false end end end
Version data entries
43 entries across 43 versions & 1 rubygems