Sha256: 5cba3fed698591084754e13088d4962c85118763a3a0054f58c99936dbeacbd1

Contents?: true

Size: 368 Bytes

Versions: 11

Compression:

Stored size: 368 Bytes

Contents

module Arbre

  # Stores a collection of Element objects
  class ElementCollection < Array

    def +(other)
      self.class.new(super)
    end

    def -(other)
      self.class.new(super)
    end

    def &(other)
      self.class.new(super)
    end

    def to_s
      self.collect do |element|
        element.to_s
      end.join('').html_safe
    end
  end

end

Version data entries

11 entries across 11 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_collection.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/arbre-1.4.0/lib/arbre/element_collection.rb
arbre-1.4.0 lib/arbre/element_collection.rb
arbre-1.3.0 lib/arbre/element_collection.rb
arbre-1.2.1 lib/arbre/element_collection.rb
arbre-1.2.0 lib/arbre/element_collection.rb
arbre-1.2.0.rc1 lib/arbre/element_collection.rb
arbre-1.1.1 lib/arbre/element_collection.rb
arbre-1.0.3 lib/arbre/element_collection.rb
arbre-1.0.2 lib/arbre/element_collection.rb
arbre-1.0.1 lib/arbre/element_collection.rb