Class: Boundy::Formatters::Time
- Inherits:
-
Object
- Object
- Boundy::Formatters::Time
- Includes:
- Boundy::Formatter::Sql::Plugin
- Defined in:
- lib/boundy/formatters/time.rb
Defined Under Namespace
Classes: Factory
Class Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(format, time) ⇒ Time
constructor
A new instance of Time.
- #to_s ⇒ Object
Methods included from Boundy::Formatter::Sql::Plugin
Constructor Details
#initialize(format, time) ⇒ Time
Returns a new instance of Time.
33 34 35 |
# File 'lib/boundy/formatters/time.rb', line 33 def initialize(format, time) @formatted = time.strftime(format) end |
Class Attribute Details
Class Method Details
.type ⇒ Object
19 20 21 |
# File 'lib/boundy/formatters/time.rb', line 19 def self.type ::Time end |
Instance Method Details
#to_s ⇒ Object
37 38 39 |
# File 'lib/boundy/formatters/time.rb', line 37 def to_s @formatted end |