Sha256: 3205ac3a8c6b3e3fd747f460f675a5437010e4dbde5455a931241c382203ea1a

Contents?: true

Size: 285 Bytes

Versions: 9

Compression:

Stored size: 285 Bytes

Contents

class Integer
  def properties
    methods.grep(/\?/).
            map{|m| method(m)}.
            uniq. # Filter out aliases
            select{|m| m.arity.zero? and m[]}.
            map{|m| m.name[0..-2]}. # Strip question mark
            map(&:to_sym).
            sort
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
numb-0.186.0 lib/numb/properties.rb
numb-0.185.0 lib/numb/properties.rb
numb-0.184.0 lib/numb/properties.rb
numb-0.181.0 lib/numb/properties.rb
numb-0.170.0 lib/numb/properties.rb
numb-0.152.0 lib/numb/properties.rb
numb-0.138.0 lib/numb/properties.rb
numb-0.125.0 lib/numb/properties.rb
numb-0.114.0 lib/numb/properties.rb