Class: Regexp
- Defined in:
- lib/ttk/symtbl.rb,
lib/ttk/dumpers/Yaml.rb,
lib/ttk/strategies/Streams.rb,
lib/ttk/strategies/Streams/Diff.rb
Instance Method Summary collapse
- #can_diff? ⇒ Boolean
- #compare_stream(stream) ⇒ Object
- #old_to_yaml ⇒ Object
- #old_to_yaml_type ⇒ Object
- #symtbl_gsub(symtbl) ⇒ Object
- #to_s_for_ttk_log ⇒ Object
- #to_yaml(opts = {}) ⇒ Object
- #to_yaml_type ⇒ Object
Instance Method Details
#can_diff? ⇒ Boolean
43 44 45 |
# File 'lib/ttk/strategies/Streams/Diff.rb', line 43 def can_diff? false end |
#compare_stream(stream) ⇒ Object
39 40 41 |
# File 'lib/ttk/strategies/Streams.rb', line 39 def compare_stream ( stream ) stream.read =~ self end |
#old_to_yaml ⇒ Object
28 |
# File 'lib/ttk/dumpers/Yaml.rb', line 28 alias_method :old_to_yaml, :to_yaml |
#old_to_yaml_type ⇒ Object
27 |
# File 'lib/ttk/dumpers/Yaml.rb', line 27 alias_method :old_to_yaml_type, :to_yaml_type |
#symtbl_gsub(symtbl) ⇒ Object
96 97 98 99 |
# File 'lib/ttk/symtbl.rb', line 96 def symtbl_gsub ( symtbl ) res = source.symtbl_gsub(symtbl) return self.class.new(res) unless res.nil? end |
#to_s_for_ttk_log ⇒ Object
42 43 44 |
# File 'lib/ttk/strategies/Streams.rb', line 42 def to_s_for_ttk_log "/#{source.sub(/\//, '\\/')}/" end |
#to_yaml(opts = {}) ⇒ Object
32 33 34 35 36 |
# File 'lib/ttk/dumpers/Yaml.rb', line 32 def to_yaml ( opts={} ) YAML::quick_emit(self.object_id, opts) do |out| out << "#{to_yaml_type} #{source}" end end |
#to_yaml_type ⇒ Object
29 30 31 |
# File 'lib/ttk/dumpers/Yaml.rb', line 29 def to_yaml_type '!re' end |