Class: Configuration::Matcher
- Inherits:
-
Object
- Object
- Configuration::Matcher
- Defined in:
- lib/httpimagestore/configuration/handler.rb
Instance Attribute Summary collapse
-
#matcher ⇒ Object
readonly
Returns the value of attribute matcher.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
Instance Method Summary collapse
-
#initialize(names, debug_type = '', debug_value = '', &matcher) ⇒ Matcher
constructor
A new instance of Matcher.
- #to_s ⇒ Object
Constructor Details
#initialize(names, debug_type = '', debug_value = '', &matcher) ⇒ Matcher
Returns a new instance of Matcher.
253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/httpimagestore/configuration/handler.rb', line 253 def initialize(names, debug_type = '', debug_value = '', &matcher) @names = names @matcher = matcher @debug_type = debug_type @debug_value = case debug_value when Regexp "/#{debug_value.source}/" else debug_value.inspect end end |
Instance Attribute Details
#matcher ⇒ Object (readonly)
Returns the value of attribute matcher.
266 267 268 |
# File 'lib/httpimagestore/configuration/handler.rb', line 266 def matcher @matcher end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
265 266 267 |
# File 'lib/httpimagestore/configuration/handler.rb', line 265 def names @names end |
Instance Method Details
#to_s ⇒ Object
268 269 270 271 272 273 274 |
# File 'lib/httpimagestore/configuration/handler.rb', line 268 def to_s if @names.empty? "#{@debug_type}(#{@debug_value})" else "#{@debug_type}(#{@names.join(',')} => #{@debug_value})" end end |