Class: Aws::Xml::Parser::TimestampFrame Private
- Defined in:
- lib/aws-sdk-core/xml/parser/frame.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from Frame
Instance Method Summary collapse
- #parse(value) ⇒ Object private
- #set_text(value) ⇒ Object private
Methods inherited from Frame
#child_frame, #consume_child_frame, #initialize, new
Constructor Details
This class inherits a constructor from Aws::Xml::Parser::Frame
Instance Method Details
#parse(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/aws-sdk-core/xml/parser/frame.rb', line 269 def parse(value) case value when nil then nil when /^\d+$/ then Time.at(value.to_i) else begin Time.parse(value).utc rescue ArgumentError raise "unhandled timestamp format `#{value}'" end end end |
#set_text(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
266 267 268 |
# File 'lib/aws-sdk-core/xml/parser/frame.rb', line 266 def set_text(value) @result = parse(value) end |