Sha256: f760a8eb706b075f68606e8ddcf028650f960eecdfd869589133c4a7b25f1f1f

Contents?: true

Size: 422 Bytes

Versions: 5

Compression:

Stored size: 422 Bytes

Contents

module Bogus
  class AddsRecording
    extend Takes

    takes :converts_name_to_class, :create_proxy_class, :overwrites_classes,
      :overwritten_classes

    def add(name, klass = nil)
      klass ||= converts_name_to_class.convert(name)
      new_klass = create_proxy_class.call(name, klass)
      overwrites_classes.overwrite(klass.name, new_klass)
      overwritten_classes.add(klass.name, klass)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bogus-0.1.0 lib/bogus/adds_recording.rb
bogus-0.0.4 lib/bogus/adds_recording.rb
bogus-0.0.3 lib/bogus/adds_recording.rb
bogus-0.0.3.rc.2 lib/bogus/adds_recording.rb
bogus-0.0.3.rc.1 lib/bogus/adds_recording.rb