Class: CodeJam::TestCase

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ TestCase

Returns a new instance of TestCase.



6
7
8
# File 'lib/codejam/testcase.rb', line 6

def initialize(input)
  @input = input
end

Instance Attribute Details

#inputObject (readonly)

Returns the value of attribute input.



4
5
6
# File 'lib/codejam/testcase.rb', line 4

def input
  @input
end

Instance Method Details

#==(other) ⇒ Object



18
19
20
# File 'lib/codejam/testcase.rb', line 18

def ==(other)
  self.input == other.input
end

#funObject



14
15
16
# File 'lib/codejam/testcase.rb', line 14

def fun
  input #default behaviour is echo
end

#runObject



10
11
12
# File 'lib/codejam/testcase.rb', line 10

def run
  fun
end