Class: Excelsieur::Report

Inherits:
Struct
  • Object
show all
Defined in:
lib/excelsieur/report.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Report

Returns a new instance of Report.



5
6
7
8
9
10
11
# File 'lib/excelsieur/report.rb', line 5

def initialize(*args)
  super(*args)

  self.expected ||= 0
  self.inserted ||= 0
  self.failed ||= 0
end

Instance Attribute Details

#expectedObject

Returns the value of attribute expected

Returns:

  • (Object)

    the current value of expected



4
5
6
# File 'lib/excelsieur/report.rb', line 4

def expected
  @expected
end

#failedObject

Returns the value of attribute failed

Returns:

  • (Object)

    the current value of failed



4
5
6
# File 'lib/excelsieur/report.rb', line 4

def failed
  @failed
end

#insertedObject

Returns the value of attribute inserted

Returns:

  • (Object)

    the current value of inserted



4
5
6
# File 'lib/excelsieur/report.rb', line 4

def inserted
  @inserted
end

Instance Method Details

#done?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/excelsieur/report.rb', line 17

def done?
  expected == total
end

#totalObject



13
14
15
# File 'lib/excelsieur/report.rb', line 13

def total
  inserted + failed
end