Module: Dolphin::Helpers::RequestHelper

Defined in:
lib/dolphin/helpers/request_helper.rb

Instance Method Summary collapse

Instance Method Details

#parse_time(time) ⇒ Object



16
17
18
19
# File 'lib/dolphin/helpers/request_helper.rb', line 16

def parse_time(time)
  return nil if time.blank? || !time.is_a?(String)
  Time.parse(URI.decode(time)).to_time
end

#required(name) ⇒ Object



9
10
11
12
13
14
# File 'lib/dolphin/helpers/request_helper.rb', line 9

def required(name)
  case name
    when 'notification_id'
      raise 'Not found X-Notification-Id' if @notification_id.nil?
  end
end