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.
195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/pretty_debug.rb', line 195 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 |