Sha256: 94df099e44ab2487b0d1ad7d396f837f2174ac6abff782161aa46c6b0dd7655d

Contents?: true

Size: 469 Bytes

Versions: 8

Compression:

Stored size: 469 Bytes

Contents

require 'pathname'

module Metasploit
  module Model
    # Adds {#real_pathname} to class, which will convert `#real_path` `String` to a `Pathname`.
    module RealPathname
      # `#real_path` as a `Pathname`.
      #
      # @return [Pathname] unless `#real_path` is `nil`.
      # @return [nil] if `#real_path` is `nil`.
      def real_pathname
        if real_path
          Pathname.new(real_path)
        else
          nil
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metasploit-model-0.27.3 lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.3-java lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.2 lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.2-java lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.1 lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.1-java lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.0 lib/metasploit/model/real_pathname.rb
metasploit-model-0.27.0-java lib/metasploit/model/real_pathname.rb