Class: WarningShot::FileResolver::FileResource Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/resolvers/file_resolver.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Define FileResource struct

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



20
21
22
# File 'lib/resolvers/file_resolver.rb', line 20

def source
  @source
end

#targetObject

Returns the value of attribute target

Returns:

  • (Object)

    the current value of target



20
21
22
# File 'lib/resolvers/file_resolver.rb', line 20

def target
  @target
end

Instance Method Details

#exists?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


21
# File 'lib/resolvers/file_resolver.rb', line 21

def exists?;File.exists?(File.expand_path(target.path));end

#removeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



22
# File 'lib/resolvers/file_resolver.rb', line 22

def remove;File.unlink(File.expand_path(target.path));end