Class: Fixversion::InTimeZone
- Inherits:
-
Object
- Object
- Fixversion::InTimeZone
- Defined in:
- lib/fixversion/in_time_zone.rb
Instance Attribute Summary collapse
-
#today ⇒ Object
Returns the value of attribute today.
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(today = time_current_default) ⇒ InTimeZone
constructor
A new instance of InTimeZone.
- #time_current_default ⇒ Object
- #time_zones ⇒ Object
Constructor Details
#initialize(today = time_current_default) ⇒ InTimeZone
Returns a new instance of InTimeZone.
8 9 10 |
# File 'lib/fixversion/in_time_zone.rb', line 8 def initialize(today = time_current_default) @today = today end |
Instance Attribute Details
#today ⇒ Object
Returns the value of attribute today.
6 7 8 |
# File 'lib/fixversion/in_time_zone.rb', line 6 def today @today end |
Instance Method Details
#fetch ⇒ Object
12 13 14 15 16 17 |
# File 'lib/fixversion/in_time_zone.rb', line 12 def fetch base = Base.new(today) # debugger; base.fix_version end |
#time_current_default ⇒ Object
19 20 21 |
# File 'lib/fixversion/in_time_zone.rb', line 19 def time_current_default DateTime.current.in_time_zone("Mountain Time (US & Canada)").to_datetime end |
#time_zones ⇒ Object
23 |
# File 'lib/fixversion/in_time_zone.rb', line 23 def time_zones = ActiveSupport::TimeZone.all.map(&:name) |