Sha256: 61bde7aa3be744e932ac90d4e72993a55c862489ceaa69bfb0e005d713f090be

Contents?: true

Size: 720 Bytes

Versions: 28

Compression:

Stored size: 720 Bytes

Contents

module Kernel

  def sender
    sender_properties= Hash.new
    # File system
    begin
      # folder create from caller
      begin
        folder= caller[0].split(".{rb,ru}:").first.split(File::SEPARATOR)
        sender_properties[:file]= folder[(folder.count-1)].split(':')[0]
        folder= folder[0..(folder.count-2)]
      end
      # after formatting
      begin

        if !File.directory?(folder.join(File::SEPARATOR))
          folder.pop
        end
        folder= File.join(folder.join(File::SEPARATOR))
        if folder != File.expand_path(folder)
          folder= File.expand_path(folder)
        end

      end
      sender_properties[:folder]= folder
    end
    return sender_properties
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
procemon-0.4.1 lib/procemon/function/sender.rb
procemon-0.4.0 lib/procemon/function/sender.rb
procemon-0.3.4 lib/procemon/function/sender.rb
procemon-0.3.3 lib/procemon/function/sender.rb
procemon-0.3.2 lib/procemon/function/sender.rb
procemon-0.3.1 lib/procemon/function/sender.rb
procemon-0.2.0 lib/procemon/function/sender.rb
procemon-0.1.5 lib/procemon/function/sender.rb