Class: EPIC::Handle::XHTML
- Inherits:
-
Rackful::XHTML
- Object
- Rackful::Serializer
- Rackful::XHTML
- EPIC::Handle::XHTML
- Defined in:
- src/epic_handle.rb
Constant Summary
Constant Summary
Constants inherited from Rackful::XHTML
Instance Attribute Summary
Attributes inherited from Rackful::Serializer
Instance Method Summary (collapse)
-
- (void) each_nested {|self.serialize values| ... }
:yields: strings.
Methods inherited from Rackful::XHTML
#each, #footer, #header, #htmlify, #xsd_type
Methods inherited from Rackful::Serializer
Constructor Details
This class inherits a constructor from Rackful::Serializer
Instance Method Details
- (void) each_nested {|self.serialize values| ... }
:yields: strings
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 |
# File 'src/epic_handle.rb', line 319 def each_nested # :yields: strings values = self.resource.to_a values.each do |value| value[:timestamp] = Time.at(value[:timestamp]).utc.xmlschema value[:ttl] = ( 0 == value[:ttl_type] ) ? value[:ttl].to_s + 's' : Time.at(value[:ttl]).utc.xmlschema value.delete :ttl_type value[:perms] = ( value[:admin_read] ? 'r' : '-' ) + ( value[:admin_write] ? 'w' : '-' ) + ( value[:pub_read] ? 'r' : '-' ) + ( value[:pub_write] ? 'w' : '-' ) value.delete :admin_read value.delete :admin_write value.delete :pub_read value.delete :pub_write end yield self.serialize values end |