Sha256: 61bfb3c6e1ae34148e785c6159430d42f19180b1c62591d63ed90107e509413b

Contents?: true

Size: 206 Bytes

Versions: 4

Compression:

Stored size: 206 Bytes

Contents

class Object
  def any_kind_of? *kinds
    kinds.each do |kind|
      return true if self.kind_of? kind
    end
    false
  end

  def kind_of_label?
    self.any_kind_of? String, Symbol          
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sugar-high-0.1.4 lib/sugar-high/kind_of.rb
sugar-high-0.1.2 lib/sugar-high/kind_of.rb
sugar-high-0.1.1 lib/sugar-high/kind_of.rb
sugar-high-0.1.0 lib/sugar-high/kind_of.rb