Sha256: daa275fdea9b6b005aca2bcefa5b4f8c257dd62d3dc0f7bb26b754089b518483

Contents?: true

Size: 882 Bytes

Versions: 28

Compression:

Stored size: 882 Bytes

Contents

# -*- encoding: UTF-8 -*-

module CSD
  # This namespace is given to modifications to the ruby language or other gems. Its purpose is to
  # simplify working with simple objects, such as Arrays, Files, etc.
  #
  module Extensions
    # This namespace is given to all extensions made to the Ruby Core or the Ruby Standard Library.
    #
    module Core
      # This module comprises extensions to the Array object.
      #
      module Array

        # Equal to <tt>self[1]</tt>.
        def second
          self[1]
        end

        # Equal to <tt>self[2]</tt>.
        def third
          self[2]
        end

        # Equal to <tt>self[3]</tt>.
        def fourth
          self[3]
        end

        # Equal to <tt>self[4]</tt>.
        def fifth
          self[4]
        end

      end
    end
  end
end

class Array #:nodoc:
  include CSD::Extensions::Core::Array
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
csd-0.1.13 lib/csd/extensions/core/array.rb
csd-0.1.12 lib/csd/extensions/core/array.rb
csd-0.1.11 lib/csd/extensions/core/array.rb
csd-0.1.10 lib/csd/extensions/core/array.rb
csd-0.1.9 lib/csd/extensions/core/array.rb
csd-0.1.8 lib/csd/extensions/core/array.rb
csd-0.1.7 lib/csd/extensions/core/array.rb
csd-0.1.6 lib/csd/extensions/core/array.rb