Class: RSpec::Support::ObjectFormatter::TimeInspector Private
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
BaseInspector ,
Struct
|
|
Instance Chain:
self,
BaseInspector ,
Struct
|
|
Inherits: |
RSpec::Support::ObjectFormatter::BaseInspector
|
Defined in: | rspec-support/lib/rspec/support/object_formatter.rb |
Constant Summary
-
FORMAT =
# File 'rspec-support/lib/rspec/support/object_formatter.rb', line 142"%Y-%m-%d %H:%M:%S"
Class Method Summary
Instance Attribute Summary
BaseInspector
- Inherited
Instance Method Summary
Class Method Details
.can_inspect?(object) ⇒ Boolean
# File 'rspec-support/lib/rspec/support/object_formatter.rb', line 144
def self.can_inspect?(object) Time === object end
Instance Method Details
#inspect
for 1.8.7
# File 'rspec-support/lib/rspec/support/object_formatter.rb', line 153
def inspect object.strftime("#{FORMAT}.#{"%09d" % object.nsec} %z") end