Class: Decisive::RenderContext
- Inherits:
-
Struct
- Object
- Struct
- Decisive::RenderContext
- Defined in:
- lib/decisive/template_handler.rb
Defined Under Namespace
Classes: Row
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#records ⇒ Object
Returns the value of attribute records.
Instance Method Summary collapse
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block
219 220 221 |
# File 'lib/decisive/template_handler.rb', line 219 def block @block end |
#filename ⇒ Object
Returns the value of attribute filename
219 220 221 |
# File 'lib/decisive/template_handler.rb', line 219 def filename @filename end |
#records ⇒ Object
Returns the value of attribute records
219 220 221 |
# File 'lib/decisive/template_handler.rb', line 219 def records @records end |
Instance Method Details
#csv? ⇒ Boolean
226 227 228 |
# File 'lib/decisive/template_handler.rb', line 226 def csv? true end |
#to_csv(*args, **kwargs) ⇒ Object
220 221 222 223 224 |
# File 'lib/decisive/template_handler.rb', line 220 def to_csv(*args, **kwargs) (header + body).map do |row| row.to_csv(*args, **kwargs) end.join end |