Sha256: 69a9fe26ae50f16a4206d6190053ce3b88a3686ecdf6a071ae1c0bb9539e2a80

Contents?: true

Size: 227 Bytes

Versions: 145

Compression:

Stored size: 227 Bytes

Contents

module RubyApp

  module Mixins

    module ArrayExtension

      def second_last
        self.length > 1 ?  self[self.length - 2] : nil
      end

    end

  end

end

class Array
  include RubyApp::Mixins::ArrayExtension
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
RubyApp-0.6.65 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.64 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.63 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.62 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.61 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.60 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.59 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.58 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.57 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.53 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.52 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.51 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.50 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.49 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.48 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.47 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.46 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.45 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.44 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.43 lib/ruby_app/mixins/array_extension.rb