Class: Opal::IRB::Silencer
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ Silencer 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Silencer. 
- #silence ⇒ Object
- #warnings ⇒ Object
Constructor Details
#initialize ⇒ Silencer
Returns a new instance of Silencer.
| 88 89 90 | # File 'opal/opal/corelib/irb.rb', line 88 def initialize @stderr = $stderr end | 
Instance Method Details
#silence ⇒ Object
| 92 93 94 95 96 97 98 | # File 'opal/opal/corelib/irb.rb', line 92 def silence @collector = ::StringIO.new $stderr = @collector yield ensure $stderr = @stderr end | 
#warnings ⇒ Object
| 100 101 102 | # File 'opal/opal/corelib/irb.rb', line 100 def warnings @collector.string end |