Class: Prismic::Ref
- Inherits:
-
Object
- Object
- Prismic::Ref
- Defined in:
- lib/prismic.rb
Overview
Represent a prismic.io reference, a fix point in time.
The references must be provided when accessing to any prismic.io resource (except /api) and allow to assert that the URL you use will always returns the same results.
Instance Attribute Summary collapse
-
#id ⇒ String
Returns the value of attribute id.
-
#is_master ⇒ Boolean
(also: #master?)
Returns the value of attribute is_master.
-
#label ⇒ String
Returns the value of attribute label.
-
#ref ⇒ String
Returns the value of attribute ref.
-
#scheduled_at ⇒ Time
Returns the value of attribute scheduled_at.
Instance Method Summary collapse
-
#initialize(id, ref, label, is_master = false, scheduled_at = nil) ⇒ Ref
constructor
A new instance of Ref.
Constructor Details
#initialize(id, ref, label, is_master = false, scheduled_at = nil) ⇒ Ref
Returns a new instance of Ref
524 525 526 527 528 529 530 |
# File 'lib/prismic.rb', line 524 def initialize(id, ref, label, is_master = false, scheduled_at = nil) @id = id @ref = ref @label = label @is_master = is_master @scheduled_at = scheduled_at end |
Instance Attribute Details
#id ⇒ String
Returns the value of attribute id.
502 503 504 |
# File 'lib/prismic.rb', line 502 def id @id end |
#is_master ⇒ Boolean Also known as: master?
Returns the value of attribute is_master.
517 518 519 |
# File 'lib/prismic.rb', line 517 def is_master @is_master end |
#label ⇒ String
Returns the value of attribute label.
512 513 514 |
# File 'lib/prismic.rb', line 512 def label @label end |
#ref ⇒ String
Returns the value of attribute ref.
507 508 509 |
# File 'lib/prismic.rb', line 507 def ref @ref end |
#scheduled_at ⇒ Time
Returns the value of attribute scheduled_at.
522 523 524 |
# File 'lib/prismic.rb', line 522 def scheduled_at @scheduled_at end |