Module: Matisse

Defined in:
lib/matisse.rb,
lib/matisse/colors.rb,
lib/matisse/version.rb

Constant Summary collapse

COLORS =
{
  :array_delimiter          => :light_green,
  :array_comma              => :blue,
  
  :class                    => :yellow,
  :class_delimiter          => :light_yellow,
  
  :enumerator               => :red,
  :enumerator_arg_separator => :blue,

  :falseclass               => :red,
  
  :float                    => :cyan,
  :float_exp                => :green,
  :float_plusminus          => :cyan,
  :float_separator          => :green,
    
  :hash_delimiter           => :light_green,
  :hash_comma               => :blue,
  :hash_rocket              => :blue,
  
  :lambda                   => :red,
  
  :matrix                   => :blue,
  
  :nilclass                 => :blue,
  
  :numeric                  => :cyan,
  
  :object_delimiter         => :light_yellow,
  :object_separator         => :blue,
  :object_address           => :green,
  :object_from              => :light_blue,
    
  :range_dots               => :red,
  
  :rational_delimiter       => :light_yellow,
  :rational_slash           => :blue,
  
  :regexp_delimiter         => :light_red,
  :regexp                   => :cyan,
  
  :string_delimiter         => :light_red,
  :string                   => :cyan,
  
  :symbol                   => :yellow,
  
  :trueclass                => :green
}
VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.disableObject



19
20
21
22
23
# File 'lib/matisse.rb', line 19

def self.disable
  ::IRB::Irb.class_eval do
    alias :output_value :old_output_value
  end
end

.enableObject



9
10
11
12
13
14
15
16
17
# File 'lib/matisse.rb', line 9

def self.enable
  ::IRB::Irb.class_eval do
    alias :old_output_value :output_value

    def output_value
      printf @context.return_format, @context.last_value.inspect_colorized
    end
  end
end