Class: Emma::Report::Coverages

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, method, block, line) ⇒ Coverages

Returns a new instance of Coverages.



113
114
115
116
117
118
# File 'lib/emma/report.rb', line 113

def initialize(klass, method, block, line)
  @klass  = klass
  @method = method
  @block  = block
  @line   = line
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



111
112
113
# File 'lib/emma/report.rb', line 111

def block
  @block
end

#klassObject (readonly)

Returns the value of attribute klass.



111
112
113
# File 'lib/emma/report.rb', line 111

def klass
  @klass
end

#lineObject (readonly)

Returns the value of attribute line.



111
112
113
# File 'lib/emma/report.rb', line 111

def line
  @line
end

#methodObject (readonly)

Returns the value of attribute method.



111
112
113
# File 'lib/emma/report.rb', line 111

def method
  @method
end

Instance Method Details

#as_json(opts = nil) ⇒ Object



120
121
122
123
124
125
126
127
# File 'lib/emma/report.rb', line 120

def as_json(opts = nil)
  {
    :class => klass,
    :method => method,
    :block => block,
    :line => line
  }
end

#to_json(*args) ⇒ Object



129
130
131
# File 'lib/emma/report.rb', line 129

def to_json(*args)
  as_json.to_json(*args)
end