Class: CodeInclusion::Subset::Section
- Inherits:
 - 
      Object
      
        
- Object
 - CodeInclusion::Subset::Section
 
 
- Defined in:
 - lib/polytexnic/code_inclusion.rb
 
Overview
Return the lines in the named section.
Instance Attribute Summary collapse
- 
  
    
      #input  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute input.
 - 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 
Instance Method Summary collapse
- 
  
    
      #initialize(input, args)  ⇒ Section 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Section.
 - #lines ⇒ Object
 
Constructor Details
#initialize(input, args) ⇒ Section
Returns a new instance of Section.
      376 377 378 379  | 
    
      # File 'lib/polytexnic/code_inclusion.rb', line 376 def initialize(input, args) @input = input @name = args[:section] end  | 
  
Instance Attribute Details
#input ⇒ Object (readonly)
Returns the value of attribute input.
      374 375 376  | 
    
      # File 'lib/polytexnic/code_inclusion.rb', line 374 def input @input end  | 
  
#name ⇒ Object (readonly)
Returns the value of attribute name.
      374 375 376  | 
    
      # File 'lib/polytexnic/code_inclusion.rb', line 374 def name @name end  | 
  
Instance Method Details
#lines ⇒ Object
      381 382 383 384  | 
    
      # File 'lib/polytexnic/code_inclusion.rb', line 381 def lines ensure_exists! input.slice(index_of_first_line, length) end  |