Class: Actions::Middleware::KeepCurrentTimezone

Inherits:
Dynflow::Middleware
  • Object
show all
Defined in:
app/lib/actions/middleware/keep_current_timezone.rb

Instance Method Summary collapse

Instance Method Details

#delay(*args) ⇒ Object



4
5
6
# File 'app/lib/actions/middleware/keep_current_timezone.rb', line 4

def delay(*args)
  pass(*args).tap { store_current_timezone }
end

#finalizeObject



18
19
20
# File 'app/lib/actions/middleware/keep_current_timezone.rb', line 18

def finalize
  restore_curent_timezone { pass }
end

#hook(*args) ⇒ Object

Run all execution plan lifecycle hooks as the original timezone



23
24
25
# File 'app/lib/actions/middleware/keep_current_timezone.rb', line 23

def hook(*args)
  restore_curent_timezone { pass(*args) }
end

#plan(*args) ⇒ Object



8
9
10
11
12
# File 'app/lib/actions/middleware/keep_current_timezone.rb', line 8

def plan(*args)
  with_current_timezone do
    pass(*args).tap { store_current_timezone }
  end
end

#run(*args) ⇒ Object



14
15
16
# File 'app/lib/actions/middleware/keep_current_timezone.rb', line 14

def run(*args)
  restore_curent_timezone { pass(*args) }
end