Class: Camayoc::StatEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/camayoc/stat_event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, source, stat, value, options = {}) ⇒ StatEvent

Constructor

  • type

    Symbol of stat type: count, timing, or generic

  • source

    Source of stat

  • stat

    Name of stat

  • value

    Value of stat

  • options

    Optionals options



12
13
14
15
16
17
18
# File 'lib/camayoc/stat_event.rb', line 12

def initialize(type,source,stat,value,options={})
  self.type = type
  self.source = source
  self.stat = stat
  self.value = value
  self.options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/camayoc/stat_event.rb', line 4

def options
  @options
end

#sourceObject

Returns the value of attribute source.



4
5
6
# File 'lib/camayoc/stat_event.rb', line 4

def source
  @source
end

#statObject

Returns the value of attribute stat.



4
5
6
# File 'lib/camayoc/stat_event.rb', line 4

def stat
  @stat
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/camayoc/stat_event.rb', line 4

def type
  @type
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/camayoc/stat_event.rb', line 4

def value
  @value
end

Instance Method Details

#ns_statObject



20
21
22
# File 'lib/camayoc/stat_event.rb', line 20

def ns_stat
  "#{source}#{Camayoc::DELIMITER}#{stat}"
end