Module: Cream::Helper::Host

Defined in:
lib/cream/helper/host.rb

Instance Method Summary collapse

Instance Method Details

#localhost?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/cream/helper/host.rb', line 3

def localhost?
   ['localhost', '127.0.0.1'].include?(request.host)
end

#publichost?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/cream/helper/host.rb', line 7

def publichost?
   !localhost?
end