Class: EPIC::TXT
- Inherits:
-
Rackful::Serializer
- Object
- Rackful::Serializer
- EPIC::TXT
- Defined in:
- src/epic_collection.rb
Constant Summary
- CONTENT_TYPES =
[ 'text/plain; charset=US-ASCII', 'text/csv; charset=US-ASCII', ]
Instance Attribute Summary
Attributes inherited from Rackful::Serializer
Instance Method Summary (collapse)
- - (void) each
-
- (TXT) initialize(*args)
constructor
A new instance of TXT.
Constructor Details
- (TXT) initialize(*args)
A new instance of TXT
27 28 29 30 31 |
# File 'src/epic_collection.rb', line 27 def initialize *args super(*args) @newline = ( 'text/csv; charset=US-ASCII' == self.content_type ) ? "\r\n" : "\n" end |
Instance Method Details
- (void) each
32 33 34 35 36 37 |
# File 'src/epic_collection.rb', line 32 def each self.resource.each do |path| yield path.to_s + @newline end end |