Class: Prismic::AlternateLanguage

Inherits:
Object
  • Object
show all
Defined in:
lib/prismic.rb

Overview

A class for the alternate language versions of a document

The alternate_language function is the recommended way to create an AlternateLanguage.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ AlternateLanguage

Returns a new instance of AlternateLanguage.



607
608
609
610
611
612
# File 'lib/prismic.rb', line 607

def initialize(json)
  @id = json['id']
  @uid = json['uid']
  @type = json['type']
  @lang = json['lang']
end

Instance Attribute Details

#idString

Returns:

  • (String)


599
600
601
# File 'lib/prismic.rb', line 599

def id
  @id
end

#langString

Returns:

  • (String)


605
606
607
# File 'lib/prismic.rb', line 605

def lang
  @lang
end

#typeString

Returns:

  • (String)


603
604
605
# File 'lib/prismic.rb', line 603

def type
  @type
end

#uidString

Returns:

  • (String)


601
602
603
# File 'lib/prismic.rb', line 601

def uid
  @uid
end