trabajo-afectivo/lib/application_handle_info.rb

15 lines
298 B
Ruby
Raw Normal View History

module ApplicationHandleInfo
def self.current
Thread.current[:application_handle] || 'unknown'
end
def self.current=(name)
Thread.current[:application_handle] = name
end
2017-11-23 08:09:44 +00:00
def self.postmaster?
return false if current.blank?
current.split('.')[1] == 'postmaster'
end
end