Class: Xcov::Range

Inherits:
Object
  • Object
show all
Defined in:
lib/xcov/model/range.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(execution_count, location, length) ⇒ Range

Returns a new instance of Range.



8
9
10
11
12
# File 'lib/xcov/model/range.rb', line 8

def initialize(execution_count, location, length)
  @execution_count = execution_count
  @location = location
  @length = length
end

Instance Attribute Details

#execution_countObject (readonly)

Returns the value of attribute execution_count.



4
5
6
# File 'lib/xcov/model/range.rb', line 4

def execution_count
  @execution_count
end

#lengthObject (readonly)

Returns the value of attribute length.



6
7
8
# File 'lib/xcov/model/range.rb', line 6

def length
  @length
end

#locationObject (readonly)

Returns the value of attribute location.



5
6
7
# File 'lib/xcov/model/range.rb', line 5

def location
  @location
end

Class Method Details

.map(dictionary) ⇒ Object

Class methods



16
17
18
19
20
21
22
# File 'lib/xcov/model/range.rb', line 16

def self.map(dictionary)
  Range.new(
    dictionary["executionCount"],
    dictionary["location"],
    dictionary["length"]
  )
end