Class: Gliffy::DocumentParser
- Inherits:
-
BaseParser
- Object
- BaseParser
- Gliffy::DocumentParser
- Defined in:
- lib/gliffy/response.rb
Overview
Factory for parsing an Account
Class Method Summary collapse
-
.from_http_response(root) ⇒ Object
:nodoc:.
Methods inherited from BaseParser
add_boolean, add_date, add_int, as_array
Class Method Details
.from_http_response(root) ⇒ Object
:nodoc:
265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/gliffy/response.rb', line 265 def self.from_http_response(root) add_int(root,'id','document_id') add_int(root,'num_versions') add_boolean(root,'is_private') add_boolean(root,'is_public') add_date(root,'create_date') add_date(root,'mod_date') add_date(root,'published_date') root['owner'] = UserParser.from_http_response(root['owner']) root['versions'] = as_array(VersionsParser.from_http_response(root)) super(root) end |