Method: Visage::Profile#initialize
- Defined in:
- lib/visage-app/profile.rb
#initialize(opts = {}) ⇒ Profile
Returns a new instance of Profile.
42 43 44 45 46 47 48 49 |
# File 'lib/visage-app/profile.rb', line 42 def initialize(opts={}) = opts [:url] = [:profile_name] ? [:profile_name].downcase.gsub(/[^\w]+/, "+") : nil @errors = {} [:hosts] = [:hosts].values if [:hosts].class == Hash [:metrics] = [:metrics].values if [:metrics].class == Hash [:percentiles] = [:percentiles].values if [:percentiles].class == Hash end |