Class: Prismic::AlternateLanguage
- Inherits:
-
Object
- Object
- Prismic::AlternateLanguage
- 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
-
#initialize(json) ⇒ AlternateLanguage
constructor
A new instance of AlternateLanguage.
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
#id ⇒ String
599 600 601 |
# File 'lib/prismic.rb', line 599 def id @id end |
#lang ⇒ String
605 606 607 |
# File 'lib/prismic.rb', line 605 def lang @lang end |
#type ⇒ String
603 604 605 |
# File 'lib/prismic.rb', line 603 def type @type end |
#uid ⇒ String
601 602 603 |
# File 'lib/prismic.rb', line 601 def uid @uid end |