Module: Shaf::UriHelper
Class Method Summary
collapse
add_path_helpers, eval_method, path_helpers, path_helpers, path_helpers_for, register, remove_all
Class Method Details
.base_uri ⇒ Object
86
87
88
89
90
91
92
93
|
# File 'lib/shaf/extensions/resource_uris.rb', line 86
def self.base_uri
return Settings.base_uri if Settings.base_uri
protocol = Settings.protocol || 'http'
host = Settings.hostname || 'localhost'
port = Settings.port ? ":#{Settings.port}" : ""
"#{protocol}://#{host}#{port}"
end
|
.included(mod) ⇒ Object
82
83
84
|
# File 'lib/shaf/extensions/resource_uris.rb', line 82
def self.included(mod)
mod.extend self
end
|