Class: MakeExportable::ExportableFormat
- Inherits:
-
Object
- Object
- MakeExportable::ExportableFormat
- Defined in:
- lib/make_exportable/exportable_format.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#long ⇒ Object
Returns the value of attribute long.
-
#mime_type ⇒ Object
Returns the value of attribute mime_type.
Class Method Summary collapse
-
.register_format ⇒ Object
Register this format with the mothership.
Instance Method Summary collapse
- #generate(data_set, data_headers = nil) ⇒ Object
- #generate_header_option(data_headers = []) ⇒ Object
- #sanitize(value) ⇒ Object
Instance Attribute Details
#long ⇒ Object
Returns the value of attribute long.
7 8 9 |
# File 'lib/make_exportable/exportable_format.rb', line 7 def long @long end |
#mime_type ⇒ Object
Returns the value of attribute mime_type.
8 9 10 |
# File 'lib/make_exportable/exportable_format.rb', line 8 def mime_type @mime_type end |
Class Method Details
.register_format ⇒ Object
Register this format with the mothership
12 13 14 15 16 |
# File 'lib/make_exportable/exportable_format.rb', line 12 def register_format unless MakeExportable.exportable_formats[self.reference] MakeExportable.exportable_formats[self.reference] = self end end |
Instance Method Details
#generate(data_set, data_headers = nil) ⇒ Object
20 21 |
# File 'lib/make_exportable/exportable_format.rb', line 20 def generate(data_set, data_headers=nil) end |
#generate_header_option(data_headers = []) ⇒ Object
27 28 29 |
# File 'lib/make_exportable/exportable_format.rb', line 27 def generate_header_option(data_headers=[]) self.mime_type += (self.data_headers.blank? || data_headers === false) ? " header=absent" : " header=present" end |
#sanitize(value) ⇒ Object
23 24 25 |
# File 'lib/make_exportable/exportable_format.rb', line 23 def sanitize(value) value end |