Class: ICWS::StatisticDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/icws/statistics/statisticdefinition.rb

Overview

Definition of a supervisor statistic

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(propertyMap) ⇒ StatisticDefinition

Creates a new Statistic category.

Parameters:

  • propertyMap (Hash)

    Map or properties that define the statistic.



16
17
18
19
20
21
# File 'lib/icws/statistics/statisticdefinition.rb', line 16

def initialize(propertyMap)
    @statistic_identifier = propertyMap['statisticIdentifier']
    @display_string = propertyMap['displayString']
    @description = propertyMap['description']
    @units_display = propertyMap['unitsDisplay']
end

Instance Attribute Details

#descriptionObject (readonly)

Description of the statistic



10
11
12
# File 'lib/icws/statistics/statisticdefinition.rb', line 10

def description
  @description
end

#display_stringObject (readonly)

Display String of the statistic



8
9
10
# File 'lib/icws/statistics/statisticdefinition.rb', line 8

def display_string
  @display_string
end

#statistic_identifierObject (readonly)

ID of the statistic



6
7
8
# File 'lib/icws/statistics/statisticdefinition.rb', line 6

def statistic_identifier
  @statistic_identifier
end

#units_displayObject (readonly)

Statistic Units



12
13
14
# File 'lib/icws/statistics/statisticdefinition.rb', line 12

def units_display
  @units_display
end

Instance Method Details

#to_sObject

String reporesentation - DisplayString (Stat Id)



24
25
26
# File 'lib/icws/statistics/statisticdefinition.rb', line 24

def to_s
    '   ' + @display_string + '(' + @statistic_identifier + ')'
end