Sha256: e7031ec8cb065c6c3ab86ed2eef9d56a0ade0894770ae044b608f4d5efbdad86
Contents?: true
Size: 386 Bytes
Versions: 1
Compression:
Stored size: 386 Bytes
Contents
class Object unless respond_to?(:itself) # TODO: Remove this file when we drop support for Ruby < 2.2 # Returns the object itself. Useful when dealing with a chaining scenario, like Active Record scopes: # # Event.public_send(state.presence_in([ :trashed, :drafted ]) || :itself).order(:created_at) # # @return Object def itself self end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activesupport-4.2.0.beta1 | lib/active_support/core_ext/object/itself.rb |