Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/awesome_print_motion/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def awesome_hash(h)
def awesome_object(o)
vars = o.instance_variables.map do |var|
next if var =~ /^__.*?__$/ # Skip internal RubyMotion variables.

property = var[1..-1].to_sym
accessor = if o.respond_to?(:"#{property}=")
o.respond_to?(property) ? :accessor : :writer
Expand Down Expand Up @@ -221,6 +222,8 @@ def awesome_instance(o)
#------------------------------------------------------------------------------
def methods_array(a)
a.sort! { |x, y| x.to_s <=> y.to_s } # Can't simply a.sort! because of o.methods << [ :blah ]
a.reject! { |y| y =~ /^attentionClassDumpUser/ } # BS var from class-dump. see http://openradar.appspot.com/7044974

object = a.instance_variable_get('@__awesome_methods__')
tuples = a.map do |name|
if name.is_a?(Symbol) || name.is_a?(String) # Ignore garbage, ex. 42.methods << [ :blah ]
Expand Down