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.5.59 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.58 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.57 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.56 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.55 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.54 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.53 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.52 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.51 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.50 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.49 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.48 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.47 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.46 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.45 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.44 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.43 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.42 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.41 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.40 lib/ruby_app/mixins/array_extension.rb