Sha256: bb0dec40e27cd17681673313b618b1e4331c5c622e86709984c6d1799dea88be

Contents?: true

Size: 298 Bytes

Versions: 4

Compression:

Stored size: 298 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

4 entries across 4 versions & 1 rubygems

Version Path
sugar-high-0.7.3 lib/sugar-high/methods.rb
sugar-high-0.7.2 lib/sugar-high/methods.rb
sugar-high-0.7.1 lib/sugar-high/methods.rb
sugar-high-0.7.0 lib/sugar-high/methods.rb