Class: Goldencobra::Url
- Inherits:
-
Object
- Object
- Goldencobra::Url
- Defined in:
- app/services/goldencobra/url.rb
Class Method Summary collapse
Class Method Details
.host ⇒ Object
15 16 17 |
# File 'app/services/goldencobra/url.rb', line 15 def host Goldencobra::Setting.for_key("goldencobra.url").gsub(/(http|https):\/\//, "") end |
.protocol ⇒ Object
11 12 13 |
# File 'app/services/goldencobra/url.rb', line 11 def protocol use_ssl? ? "https" : "http" end |
.to_s ⇒ Object
3 4 5 |
# File 'app/services/goldencobra/url.rb', line 3 def to_s @url ||= build_url end |
.use_ssl? ⇒ Boolean
7 8 9 |
# File 'app/services/goldencobra/url.rb', line 7 def use_ssl? Goldencobra::Setting.for_key("goldencobra.use_ssl") == "true" end |