Class: Albacore::OutputArtifact

Inherits:
Object
  • Object
show all
Defined in:
lib/albacore/project.rb

Constant Summary collapse

EXECUTABLE =
:executable
LIBRARY =
:dll
XMLDOC =
:xmldoc
SYMBOLS =
:symbols

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, sort) ⇒ OutputArtifact

Create a new OutputArtifact



38
39
40
41
42
# File 'lib/albacore/project.rb', line 38

def initialize path, sort
  @path, @sort = path, sort
  @ext = File.extname path
  @filename = File.basename path
end

Instance Attribute Details

#extObject (readonly)

E.g. “.txt”



35
36
37
# File 'lib/albacore/project.rb', line 35

def ext
  @ext
end

#filenameObject (readonly)

E.g. “lib.dll” E.g. “prog.exe”



29
30
31
# File 'lib/albacore/project.rb', line 29

def filename
  @filename
end

#pathObject (readonly)

E.g. “bin/Debug/lib.dll” E.g. “bin/Debug/net461/lib.dll” E.g. “bin/Debug/net461/lib.xml” E.g. “bin/Debug/net461/lib.dll.pdb” E.g. “bin/Debug/net461/prog.exe”



25
26
27
# File 'lib/albacore/project.rb', line 25

def path
  @path
end

#sortObject (readonly)

E.g. :dll



32
33
34
# File 'lib/albacore/project.rb', line 32

def sort
  @sort
end

Instance Method Details

#==(o) ⇒ Object Also known as: eql?



69
70
71
# File 'lib/albacore/project.rb', line 69

def ==(o)
  @path == o.path && @sort == o.sort
end

#dll?Boolean

Is the file a DLL file?

Returns:

  • (Boolean)


50
51
52
# File 'lib/albacore/project.rb', line 50

def dll?
  library?
end

#executable?Boolean

Is the file an executable?

Returns:

  • (Boolean)


55
56
57
# File 'lib/albacore/project.rb', line 55

def executable?
  sort == ::EXECUTABLE
end

#library?Boolean

Is the file a DLL file?

Returns:

  • (Boolean)


45
46
47
# File 'lib/albacore/project.rb', line 45

def library?
  sort == ::LIBRARY
end

#symbols?Boolean

Is the file a symbol file?

Returns:

  • (Boolean)


65
66
67
# File 'lib/albacore/project.rb', line 65

def symbols?
  sort == ::SYMBOLS
end

#xmldoc?Boolean

Is the file a documentation file?

Returns:

  • (Boolean)


60
61
62
# File 'lib/albacore/project.rb', line 60

def xmldoc?
  sort == ::XMLDOC
end