Class: Uttk::Logger::Segment
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#segment ⇒ Object
Returns the value of attribute segment.
Class Method Summary collapse
Instance Method Summary collapse
- #==(rhs) ⇒ Object
-
#initialize(segment, options = nil) ⇒ Segment
constructor
A new instance of Segment.
- #initialize_copy(rhs) ⇒ Object
- #quoted_segment ⇒ Object
- #regexp_quoted_segment ⇒ Object
Constructor Details
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
13 14 15 |
# File 'lib/uttk/logger/path.rb', line 13 def @options end |
#segment ⇒ Object
Returns the value of attribute segment.
13 14 15 |
# File 'lib/uttk/logger/path.rb', line 13 def segment @segment end |
Class Method Details
.quote(s) ⇒ Object
24 25 26 |
# File 'lib/uttk/logger/path.rb', line 24 def self.quote ( s ) s.gsub(/(?:([\/\]\[])|\\(.))/, '\\\\\1\2') end |
Instance Method Details
#==(rhs) ⇒ Object
21 22 23 |
# File 'lib/uttk/logger/path.rb', line 21 def == ( rhs ) rhs.is_a?(self.class) && @segment == rhs.segment && @options == rhs. end |
#initialize_copy(rhs) ⇒ Object
18 19 20 |
# File 'lib/uttk/logger/path.rb', line 18 def initialize_copy ( rhs ) @segment, @options = rhs.segment.try_dup, rhs..dup end |