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.42 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.41 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.40 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.39 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.38 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.36 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.35 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.34 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.33 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.32 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.31 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.29 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.28 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.27 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.26 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.25 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.24 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.22 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.21 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.16 lib/ruby_app/mixins/array_extension.rb