Class: YandexMetrica::Counter::Renderer

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex-metrica/counter/renderer.rb

Constant Summary collapse

DELIMITER =
', '

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(counter_types_collection) ⇒ Renderer

Returns a new instance of Renderer.



5
6
7
# File 'lib/yandex-metrica/counter/renderer.rb', line 5

def initialize(counter_types_collection)
  @counter_types_collection = counter_types_collection
end

Instance Attribute Details

#counter_types_collectionObject (readonly)

Returns the value of attribute counter_types_collection.



3
4
5
# File 'lib/yandex-metrica/counter/renderer.rb', line 3

def counter_types_collection
  @counter_types_collection
end

Instance Method Details

#to_sObject Also known as: render



9
10
11
# File 'lib/yandex-metrica/counter/renderer.rb', line 9

def to_s
  @counter_types_collection.map{|ct| ct.to_s}.join(DELIMITER)
end