Class: Travis::Artifacts::Path

Inherits:
Struct
  • Object
show all
Defined in:
lib/travis/artifacts/path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fromObject

Returns the value of attribute from

Returns:

  • (Object)

    the current value of from



2
3
4
# File 'lib/travis/artifacts/path.rb', line 2

def from
  @from
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



2
3
4
# File 'lib/travis/artifacts/path.rb', line 2

def root
  @root
end

#toObject

Returns the value of attribute to

Returns:

  • (Object)

    the current value of to



2
3
4
# File 'lib/travis/artifacts/path.rb', line 2

def to
  @to
end

Instance Method Details

#directory?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/travis/artifacts/path.rb', line 11

def directory?
  File.directory?(fullpath)
end

#fullpathObject



3
4
5
6
7
8
9
# File 'lib/travis/artifacts/path.rb', line 3

def fullpath
  if from =~ /^\//
    from
  else
    File.join(root, from)
  end
end