Sha256: 7b2c623bec4105eaab6f1f6397e013696a38cb6066a2a7e5475ec414ba579e8b

Contents?: true

Size: 320 Bytes

Versions: 139

Compression:

Stored size: 320 Bytes

Contents

module SocialStream
  module Views
    class List < Array
      def insert_before key, obj
        position = index{ |i| i[:key] == key }

        insert position, obj
      end

      def insert_after key, obj
        position = index{ |i| i[:key] == key } + 1

        insert position, obj
      end
    end
  end
end

Version data entries

139 entries across 139 versions & 4 rubygems

Version Path
social_stream-2.2.2 base/lib/social_stream/views/list.rb
social_stream-base-2.2.2 lib/social_stream/views/list.rb
social_stream-2.2.1 base/lib/social_stream/views/list.rb
social_stream-base-2.2.1 lib/social_stream/views/list.rb
social_stream-2.2.0 base/lib/social_stream/views/list.rb
social_stream-base-2.2.0 lib/social_stream/views/list.rb
social_stream-2.1.1 base/lib/social_stream/views/list.rb
social_stream-1.1.12 base/lib/social_stream/views/list.rb
social_stream-base-1.1.11 lib/social_stream/views/list.rb
social_stream-2.1.0 base/lib/social_stream/views/list.rb
social_stream-base-2.1.0 lib/social_stream/views/list.rb
social_stream-2.0.4 base/lib/social_stream/views/list.rb
social_stream-base-2.0.4 lib/social_stream/views/list.rb
social_stream-2.0.3 base/lib/social_stream/views/list.rb
social_stream-base-2.0.3 lib/social_stream/views/list.rb
social_stream-1.1.11 base/lib/social_stream/views/list.rb
social_stream-base-1.1.10 lib/social_stream/views/list.rb
social_stream-1.1.10 base/lib/social_stream/views/list.rb
social_stream-base-1.1.9 lib/social_stream/views/list.rb
social_stream-1.1.9 base/lib/social_stream/views/list.rb