Class: Oncall::TestFile

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ TestFile

Returns a new instance of TestFile.



5
6
7
# File 'lib/oncall/test_file.rb', line 5

def initialize(file)
  @file = file
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



3
4
5
# File 'lib/oncall/test_file.rb', line 3

def file
  @file
end

Instance Method Details

#run(reporter) ⇒ Object



9
10
11
# File 'lib/oncall/test_file.rb', line 9

def run(reporter)
  Oncall::DSL.new(self, reporter).instance_eval File.read(file)
end