Class: TapOut::Curmudgeon

Inherits:
Object
  • Object
show all
Defined in:
lib/tapout.rb

Overview

< IO

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Curmudgeon

Returns a new instance of Curmudgeon.



78
79
80
81
# File 'lib/tapout.rb', line 78

def initialize(input)
  @input = input
  @line1 = input.gets
end

Instance Method Details

#getsObject



85
86
87
88
89
90
# File 'lib/tapout.rb', line 85

def gets
  (class << self; self; end).class_eval %{
    def gets; @input.gets; end
  }
  return @line1
end

#line1Object



82
83
84
# File 'lib/tapout.rb', line 82

def line1
  @line1
end