Module: Faces::Common
- Defined in:
- lib/faces.rb
Class Method Summary collapse
-
.build_param(key, value, first = false) ⇒ Object
Builds a url query parameter string.
-
.merge_configurations(configurations) ⇒ Object
Merges together all configurations given from first to last in order of priority.
Class Method Details
.build_param(key, value, first = false) ⇒ Object
Builds a url query parameter string
107 108 109 |
# File 'lib/faces.rb', line 107 def build_param(key, value, first = false) value.present? ? (first == true ? "?#{key}=#{CGI.escape(value.to_s)}" : "&#{key}=#{CGI.escape(value.to_s)}") : '' end |
.merge_configurations(configurations) ⇒ Object
Merges together all configurations given from first to last in order of priority
99 100 101 102 103 104 105 |
# File 'lib/faces.rb', line 99 def merge_configurations(configurations) configuration = Faces::Configuration::UNIVERSAL configurations.each do |config| configuration = configuration.merge(config) end configuration end |