Sha256: 9855338cb089afe9f327be8c765866f9f4b1a1f44daf0bb9b8c275e41136b123

Contents?: true

Size: 380 Bytes

Versions: 1

Compression:

Stored size: 380 Bytes

Contents

module Traitor
  module Object
    def method_missing(m, *args, &block)
      Trait.check_conflict(self.class)
      super unless trait = self.class.traits.detect { |t| t.implements?(m) }
      trait.call(self, m, *args, &block)
    end

    def trait_send(trait, m, *args, &block)
      trait.call(self, m, *args, &block)
    end
  end
end

Object.send :include, Traitor::Object

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
traitor-0.0.1 lib/traitor/core_ext/object.rb