Class: TapOut::Curmudgeon
- Inherits:
-
Object
- Object
- TapOut::Curmudgeon
- Defined in:
- lib/tapout.rb
Overview
< IO
Instance Method Summary collapse
- #gets ⇒ Object
-
#initialize(input) ⇒ Curmudgeon
constructor
A new instance of Curmudgeon.
- #line1 ⇒ Object
Constructor Details
#initialize(input) ⇒ Curmudgeon
Returns a new instance of Curmudgeon.
86 87 88 89 |
# File 'lib/tapout.rb', line 86 def initialize(input) @input = input @line1 = input.gets end |
Instance Method Details
#gets ⇒ Object
93 94 95 96 97 98 |
# File 'lib/tapout.rb', line 93 def gets (class << self; self; end).class_eval %{ def gets; @input.gets; end } return @line1 end |
#line1 ⇒ Object
90 91 92 |
# File 'lib/tapout.rb', line 90 def line1 @line1 end |