Class: YandexMetrica::Counter::Renderer
- Inherits:
-
Object
- Object
- YandexMetrica::Counter::Renderer
- Defined in:
- lib/yandex-metrica/counter/renderer.rb
Constant Summary collapse
- DELIMITER =
', '
Instance Attribute Summary collapse
-
#counter_types_collection ⇒ Object
readonly
Returns the value of attribute counter_types_collection.
Instance Method Summary collapse
-
#initialize(counter_types_collection) ⇒ Renderer
constructor
A new instance of Renderer.
- #to_s ⇒ Object (also: #render)
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_collection ⇒ Object (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_s ⇒ Object 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 |