module Reality::Refinements
@private
Public Instance Methods
derp() { |self| ... }
click to toggle source
# File lib/reality/refinements.rb, line 5 def derp yield self end
except(*keys)
click to toggle source
# File lib/reality/refinements.rb, line 11 def except(*keys) reject { |k, _v| keys.include?(k) } end
group_count(&block)
click to toggle source
# File lib/reality/refinements.rb, line 17 def group_count(&block) block ||= ->(x) { x } Hash.new{ 0 }.tap{|res| each do |val| res[block.call(val)] += 1 end } end