Sha256: e5a1ae510c221c046ab1a64acde291957f726948a1b9455802e6dd5b64aa2881

Contents?: true

Size: 300 Bytes

Versions: 56

Compression:

Stored size: 300 Bytes

Contents

class Object  
  def get_methods *types
    types.inject([]) do |list, type|
      list << case type
      when :all
        get_methods(:private, :protected, :public)
      when :private, :protected, :public
        send :"#{type}_methods"
      end
      list.flatten
    end.flatten.uniq
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
sugar-high-0.4.6 lib/sugar-high/methods.rb
sugar-high-0.4.5.2 lib/sugar-high/methods.rb
sugar-high-0.4.5 lib/sugar-high/methods.rb
sugar-high-0.4.4.2 lib/sugar-high/methods.rb
sugar-high-0.4.4.1 lib/sugar-high/methods.rb
sugar-high-0.4.4 lib/sugar-high/methods.rb
sugar-high-0.4.3 lib/sugar-high/methods.rb
sugar-high-0.4.0 lib/sugar-high/methods.rb
sugar-high-0.3.7 lib/sugar-high/methods.rb
sugar-high-0.3.6 lib/sugar-high/methods.rb
sugar-high-0.3.5 lib/sugar-high/methods.rb
sugar-high-0.3.4 lib/sugar-high/methods.rb
sugar-high-0.3.3 lib/sugar-high/methods.rb
sugar-high-0.3.2 lib/sugar-high/methods.rb
sugar-high-0.3.1 lib/sugar-high/methods.rb
sugar-high-0.3.0 lib/sugar-high/methods.rb
sugar-high-0.2.12 lib/sugar-high/methods.rb
sugar-high-0.2.11 lib/sugar-high/methods.rb
sugar-high-0.2.10 lib/sugar-high/methods.rb
sugar-high-0.2.9 lib/sugar-high/methods.rb