Class: Bookbinder::CodeExampleReader
- Inherits:
- 
      Object
      
        - Object
- Bookbinder::CodeExampleReader
 
- Defined in:
- lib/bookbinder/code_example_reader.rb
Defined Under Namespace
Classes: InvalidSnippet, Snippet
Instance Method Summary collapse
- #get_snippet_and_language_at(marker, working_copy) ⇒ Object
- 
  
    
      #initialize(streams, fs)  ⇒ CodeExampleReader 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of CodeExampleReader. 
Constructor Details
#initialize(streams, fs) ⇒ CodeExampleReader
Returns a new instance of CodeExampleReader.
| 9 10 11 12 | # File 'lib/bookbinder/code_example_reader.rb', line 9 def initialize(streams, fs) @out = streams[:out] @fs = fs end | 
Instance Method Details
#get_snippet_and_language_at(marker, working_copy) ⇒ Object
| 14 15 16 17 18 19 20 21 | # File 'lib/bookbinder/code_example_reader.rb', line 14 def get_snippet_and_language_at(marker, working_copy) if working_copy.available? process_snippet(marker, working_copy) else out.puts(" skipping (not found) #{working_copy.full_name}") '' end end |