Module: Suhyo
- Defined in:
- lib/suhyo/config.rb,
lib/suhyo/webrat_steps.rb,
lib/suhyo/view_matchers.rb,
lib/suhyo/controller_matchers.rb
Defined Under Namespace
Modules: ControllerMatchers, HashMatchers, ParseQueryHelper, ViewMatchers
Class Method Summary collapse
-
.config {|@config| ... } ⇒ Object
Get/set Suhyo’s config values.
Class Method Details
.config {|@config| ... } ⇒ Object
Get/set Suhyo’s config values. This method can be used in several ways:
-
To get config values:
puts Suhyo.config.access_denied_url
-
To set config values:
Suhyo.config.access_denied_url = 'http://test.host/login'
-
To set config values in block form:
Suhyo.config do |config|
config.access_denied_url = 'http://test.host/login'
end
14 15 16 17 18 19 20 21 |
# File 'lib/suhyo/config.rb', line 14 def self.config @config ||= OpenStruct.new # Set defaults here @config.access_denied_url ||= 'http://test.host/login' # End of defaults yield @config if block_given? @config end |