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.
546 547 548 549 550 551 552 |
# File 'lib/prismic.rb', line 546 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.
524 525 526 |
# File 'lib/prismic.rb', line 524 def id @id end |
#is_master ⇒ Boolean Also known as: master?
Returns the value of attribute is_master.
539 540 541 |
# File 'lib/prismic.rb', line 539 def is_master @is_master end |
#label ⇒ String
Returns the value of attribute label.
534 535 536 |
# File 'lib/prismic.rb', line 534 def label @label end |
#ref ⇒ String
Returns the value of attribute ref.
529 530 531 |
# File 'lib/prismic.rb', line 529 def ref @ref end |
#scheduled_at ⇒ Time
Returns the value of attribute scheduled_at.
544 545 546 |
# File 'lib/prismic.rb', line 544 def scheduled_at @scheduled_at end |