Class: AmazingPrint::Formatters::SimpleFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- AmazingPrint::Formatters::SimpleFormatter
- Defined in:
- lib/amazing_print/formatters/simple_formatter.rb
Constant Summary
Constants inherited from BaseFormatter
BaseFormatter::DEFAULT_LIMIT_SIZE, BaseFormatter::INDENT_CACHE
Instance Attribute Summary collapse
-
#inspector ⇒ Object
readonly
Returns the value of attribute inspector.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(string, type, inspector) ⇒ SimpleFormatter
constructor
A new instance of SimpleFormatter.
Methods inherited from BaseFormatter
#align, #colorless_size, #get_limit_size, #indent, #indentation, #indented, #limited, #method_tuple, #outdent, #should_be_limited?
Methods included from Colorize
Constructor Details
#initialize(string, type, inspector) ⇒ SimpleFormatter
Returns a new instance of SimpleFormatter.
10 11 12 13 14 15 16 |
# File 'lib/amazing_print/formatters/simple_formatter.rb', line 10 def initialize(string, type, inspector) super() @string = string @type = type @inspector = inspector @options = inspector. end |
Instance Attribute Details
#inspector ⇒ Object (readonly)
Returns the value of attribute inspector.
8 9 10 |
# File 'lib/amazing_print/formatters/simple_formatter.rb', line 8 def inspector @inspector end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/amazing_print/formatters/simple_formatter.rb', line 8 def @options end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
8 9 10 |
# File 'lib/amazing_print/formatters/simple_formatter.rb', line 8 def string @string end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/amazing_print/formatters/simple_formatter.rb', line 8 def type @type end |
Instance Method Details
#format ⇒ Object
18 19 20 |
# File 'lib/amazing_print/formatters/simple_formatter.rb', line 18 def format colorize(string, type) end |