Sha256: bbb973242923aa687bc9f2a99ecd803f46959395fa968cc0f179ff10e01ba1c0
Contents?: true
Size: 716 Bytes
Versions: 1
Compression:
Stored size: 716 Bytes
Contents
# frozen_string_literal: true module ActiveMocker module LateInclusion module Extension def prepended(const) if const.respond_to?(:__extended_onto__) const.__extended_onto__.each do |ex| ex.extend self end end if const.respond_to?(:__included_onto__) const.__included_onto__.each do |ex| ex.prepend self end end end end def extended(const) __extended_onto__ << const end def __extended_onto__ @__extended_onto__ ||= [] end def included(const) __included_onto__ << const end def __included_onto__ @__included_onto__ ||= [] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_mocker-2.6.2 | lib/active_mocker/late_inclusion.rb |