class Contentful::Space

Resource class for Space. www.contentful.com/developers/documentation/content-delivery-api/#spaces

Attributes

locales[R]
name[R]

Public Class Methods

new(item, *) click to toggle source
Calls superclass method Contentful::BaseResource::new
# File lib/contentful/space.rb, line 10
def initialize(item, *)
  super

  @name = item.fetch('name', nil)
  @locales = item.fetch('locales', []).map { |locale| Locale.new(locale) }
end

Public Instance Methods

reload(client = nil) click to toggle source

@private

# File lib/contentful/space.rb, line 18
def reload(client = nil)
  return client.space unless client.nil?

  false
end