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
110 111 112 |
# File 'lib/faces.rb', line 110 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
102 103 104 105 106 107 108 |
# File 'lib/faces.rb', line 102 def merge_configurations(configurations) configuration = Faces::Configuration::UNIVERSAL configurations.each do |config| configuration = configuration.merge(config) end configuration end |