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.
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/httpimagestore/configuration/handler.rb', line 73 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}/" when nil nil else debug_value.to_s end end |
Instance Attribute Details
#matcher ⇒ Object (readonly)
Returns the value of attribute matcher.
88 89 90 |
# File 'lib/httpimagestore/configuration/handler.rb', line 88 def matcher @matcher end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
87 88 89 |
# File 'lib/httpimagestore/configuration/handler.rb', line 87 def names @names end |
Instance Method Details
#to_s ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/httpimagestore/configuration/handler.rb', line 90 def to_s if @debug_value if @names.empty? "#{@debug_type}(#{@debug_value})" else "#{@debug_type}(#{@names.join(',')} => #{@debug_value})" end else @debug_type end end |