Sha256: e8e5ef6cbaeb1c25d2530f1b37734fe6b66ac0a6ba93d738553d3b09b1fca2f1

Contents?: true

Size: 361 Bytes

Versions: 12

Compression:

Stored size: 361 Bytes

Contents

class Hash
  def select(&block)
    val = super(&block)
    if val.is_a?(Array)
      val = val.inject({}) do |accumulator, element|
        accumulator[element[0]] = element[1]
        accumulator
      end
    end
    val
  end
end

class NullObject
  def method_missing(*args)
    self
  end
end

class Object
  def pb_logger
    Punchblock.logger
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
punchblock-0.9.2 lib/punchblock/core_ext/ruby.rb
punchblock-0.9.1 lib/punchblock/core_ext/ruby.rb
punchblock-0.9.0 lib/punchblock/core_ext/ruby.rb
punchblock-0.8.4 lib/punchblock/core_ext/ruby.rb
punchblock-0.8.3 lib/punchblock/core_ext/ruby.rb
punchblock-0.8.2 lib/punchblock/core_ext/ruby.rb
punchblock-0.8.1 lib/punchblock/core_ext/ruby.rb
punchblock-0.8.0 lib/punchblock/core_ext/ruby.rb
punchblock-0.7.2 lib/punchblock/core_ext/ruby.rb
punchblock-0.7.1 lib/punchblock/core_ext/ruby.rb
punchblock-0.7.0 lib/punchblock/core_ext/ruby.rb
punchblock-0.6.2 lib/punchblock/core_ext/ruby.rb