Class: PrettyArray
Overview
Inspection
Constant Summary
Constants inherited from Array
Instance Method Summary collapse
-
#initialize(a) ⇒ PrettyArray
constructor
A new instance of PrettyArray.
- #inspect ⇒ Object
- #to_puts ⇒ Object
Methods inherited from Array
#align, #common_affix, #common_prefix, #original_inspect
Constructor Details
#initialize(a) ⇒ PrettyArray
Returns a new instance of PrettyArray.
194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/pretty_debug.rb', line 194 def initialize a super(a) reject!{ |f, l, m| f == __FILE__ or m =~ /\A<.*>\z/ # Such as `<top (required)>`, `<module:Foo>`. } reject, select = [:@reject, :@select].map{|sym| PrettyDebug.instance_variable_get(sym)} reject!{|f, l, m| reject.call(f, m)} rescue nil select!{|f, l, m| select.call(f, m)} rescue nil end |
Instance Method Details
#inspect ⇒ Object
207 |
# File 'lib/pretty_debug.rb', line 207 def inspect; to_puts.join($/) end |
#to_puts ⇒ Object
206 |
# File 'lib/pretty_debug.rb', line 206 def to_puts; align.map(&PrettyDebug.instance_variable_get(:@format)) end |