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.12 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.11 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.10 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.8 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.7 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.2 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.6.1 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.95 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.99 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.98 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.97 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.96 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.94 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.93 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.92 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.91 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.90 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.89 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.88 lib/ruby_app/mixins/array_extension.rb
RubyApp-0.5.87 lib/ruby_app/mixins/array_extension.rb