Class: Apress::YandexMarket::Presenters::Base
- Inherits:
-
Object
- Object
- Apress::YandexMarket::Presenters::Base
- Defined in:
- lib/apress/yandex_market/presenters/base.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
- #expose(row) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/apress/yandex_market/presenters/base.rb', line 11 def initialize @counter = 0 end |
Class Attribute Details
.attributes ⇒ Object
Returns the value of attribute attributes.
6 7 8 |
# File 'lib/apress/yandex_market/presenters/base.rb', line 6 def attributes @attributes end |
Instance Method Details
#expose(row) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/apress/yandex_market/presenters/base.rb', line 15 def expose(row) record = { __line__: @counter += 1, __column__: 1 } record.merge! filter(row) record end |