Sha256: e61208e251f79e9bea59bf10d4b8cf38fe77877c3f1c59750ff64b141d21761a

Contents?: true

Size: 579 Bytes

Versions: 10

Compression:

Stored size: 579 Bytes

Contents

module Arbre
  class Element
    class Proxy < BasicObject
      undef_method :==
      undef_method :equal?

      def initialize(element)
        @element = element
      end

      def respond_to?(method, include_all = false)
        if method.to_s == 'to_ary'
          false
        else
          super || @element.respond_to?(method, include_all)
        end
      end

      def method_missing(method, *args, &block)
        if method.to_s == 'to_ary'
          super
        else
          @element.__send__ method, *args, &block
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/element/proxy.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/element/proxy.rb
arbre-1.4.0 lib/arbre/element/proxy.rb
arbre-1.3.0 lib/arbre/element/proxy.rb
arbre-1.2.1 lib/arbre/element/proxy.rb
arbre-1.2.0 lib/arbre/element/proxy.rb
arbre-1.2.0.rc1 lib/arbre/element/proxy.rb
arbre-1.1.1 lib/arbre/element/proxy.rb
arbre-1.0.3 lib/arbre/element/proxy.rb
arbre-1.0.2 lib/arbre/element/proxy.rb