Class: Prismic::Variation
- Inherits:
 - 
      Object
      
        
- Object
 - Prismic::Variation
 
 
- Defined in:
 - lib/prismic/experiments.rb
 
Instance Attribute Summary collapse
- #id ⇒ String readonly
 - #label ⇒ String readonly
 - #ref ⇒ String readonly
 
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(id, ref, label)  ⇒ Variation 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Variation.
 
Constructor Details
#initialize(id, ref, label) ⇒ Variation
Returns a new instance of Variation
      87 88 89 90 91  | 
    
      # File 'lib/prismic/experiments.rb', line 87 def initialize(id, ref, label) @id = id @ref = ref @label = label end  | 
  
Instance Attribute Details
#id ⇒ String (readonly)
      81 82 83  | 
    
      # File 'lib/prismic/experiments.rb', line 81 def id @id end  | 
  
#label ⇒ String (readonly)
      85 86 87  | 
    
      # File 'lib/prismic/experiments.rb', line 85 def label @label end  | 
  
#ref ⇒ String (readonly)
      83 84 85  | 
    
      # File 'lib/prismic/experiments.rb', line 83 def ref @ref end  | 
  
Class Method Details
.parse(data) ⇒ Variation
      94 95 96  | 
    
      # File 'lib/prismic/experiments.rb', line 94 def self.parse(data) new(data['id'], data['ref'], data['label']) end  |