Class: Prismic::Fragments::StructuredText::BlockGroup
- Inherits:
 - 
      Object
      
        
- Object
 - Prismic::Fragments::StructuredText::BlockGroup
 
 
- Defined in:
 - lib/prismic/fragments/structured_text.rb
 
Overview
Used during the call of #as_html : blocks are first gathered by groups, so that list items of the same list are placed within the same group, allowing to frame their serialization with
- ...
 
- ...
 
Instance Attribute Summary collapse
- 
  
    
      #blocks  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute blocks.
 - 
  
    
      #kind  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute kind.
 
Instance Method Summary collapse
- #<<(block) ⇒ Object
 - 
  
    
      #initialize(kind)  ⇒ BlockGroup 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of BlockGroup.
 
Constructor Details
#initialize(kind) ⇒ BlockGroup
Returns a new instance of BlockGroup
      12 13 14 15  | 
    
      # File 'lib/prismic/fragments/structured_text.rb', line 12 def initialize(kind) @kind = kind @blocks = [] end  | 
  
Instance Attribute Details
#blocks ⇒ Object (readonly)
Returns the value of attribute blocks
      11 12 13  | 
    
      # File 'lib/prismic/fragments/structured_text.rb', line 11 def blocks @blocks end  | 
  
#kind ⇒ Object (readonly)
Returns the value of attribute kind
      11 12 13  | 
    
      # File 'lib/prismic/fragments/structured_text.rb', line 11 def kind @kind end  | 
  
Instance Method Details
#<<(block) ⇒ Object
      16 17 18  | 
    
      # File 'lib/prismic/fragments/structured_text.rb', line 16 def <<(block) blocks << block end  |