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.86 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.85 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.77 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.76 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.75 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.74 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.73 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.72 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.71 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.70 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.69 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.68 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.67 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.66 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.65 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.64 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.63 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.62 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.61 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.60 lib/ruby_app/mixins/array_extension.rb