Module: RubyWho::Adapter
- Defined in:
- lib/rubywho.rb
Instance Method Summary collapse
- #who0?(filter = nil) ⇒ Boolean
- #who1?(filter = nil) ⇒ Boolean
- #who?(filter = nil, level = nil, kind = nil) ⇒ Boolean
- #who_instance?(filter = nil, level = nil) ⇒ Boolean (also: #who_i?)
- #who_io?(io, filter = nil, level = nil, kind = nil) ⇒ Boolean
- #who_singleton?(filter = nil, level = nil) ⇒ Boolean (also: #who_s?)
Instance Method Details
#who0?(filter = nil) ⇒ Boolean
37 38 39 |
# File 'lib/rubywho.rb', line 37 def who0?(filter = nil) who?(filter, 0) end |
#who1?(filter = nil) ⇒ Boolean
41 42 43 |
# File 'lib/rubywho.rb', line 41 def who1?(filter = nil) who?(filter, 1) end |
#who?(filter = nil, level = nil, kind = nil) ⇒ Boolean
21 22 23 |
# File 'lib/rubywho.rb', line 21 def who?(filter = nil, level = nil, kind = nil) who_io?($stdout, filter, level, kind) end |
#who_instance?(filter = nil, level = nil) ⇒ Boolean Also known as: who_i?
31 32 33 |
# File 'lib/rubywho.rb', line 31 def who_instance?(filter = nil, level = nil) who?(filter, level, :instance) end |
#who_io?(io, filter = nil, level = nil, kind = nil) ⇒ Boolean
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rubywho.rb', line 10 def who_io?(io, filter = nil, level = nil, kind = nil) tap do |obj| if (level.nil? || level > 0) io.puts "== #{obj.inspect}.who? ==" RubyWho.new(obj, io, filter, kind).display(level) else io.puts "#{obj.inspect} #: #{RubyWho.new(obj, io, filter, kind).obj_str}" end end end |
#who_singleton?(filter = nil, level = nil) ⇒ Boolean Also known as: who_s?
25 26 27 |
# File 'lib/rubywho.rb', line 25 def who_singleton?(filter = nil, level = nil) who?(filter, level, :singleton) end |