Class: Albacore::OutputArtifact
- Inherits:
-
Object
- Object
- Albacore::OutputArtifact
- Defined in:
- lib/albacore/project.rb
Constant Summary collapse
- EXECUTABLE =
:executable
- LIBRARY =
:dll
- XMLDOC =
:xmldoc
- SYMBOLS =
:symbols
Instance Attribute Summary collapse
-
#ext ⇒ Object
readonly
E.g.
-
#filename ⇒ Object
readonly
E.g.
-
#path ⇒ Object
readonly
E.g.
-
#sort ⇒ Object
readonly
E.g.
Instance Method Summary collapse
- #==(o) ⇒ Object (also: #eql?)
-
#dll? ⇒ Boolean
Is the file a DLL file?.
-
#executable? ⇒ Boolean
Is the file an executable?.
-
#initialize(path, sort) ⇒ OutputArtifact
constructor
Create a new OutputArtifact.
-
#library? ⇒ Boolean
Is the file a DLL file?.
-
#symbols? ⇒ Boolean
Is the file a symbol file?.
-
#xmldoc? ⇒ Boolean
Is the file a documentation file?.
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
#ext ⇒ Object (readonly)
E.g. “.txt”
35 36 37 |
# File 'lib/albacore/project.rb', line 35 def ext @ext end |
#filename ⇒ Object (readonly)
E.g. “lib.dll” E.g. “prog.exe”
29 30 31 |
# File 'lib/albacore/project.rb', line 29 def filename @filename end |
#path ⇒ Object (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 |
#sort ⇒ Object (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?
50 51 52 |
# File 'lib/albacore/project.rb', line 50 def dll? library? end |
#executable? ⇒ Boolean
Is the file an executable?
55 56 57 |
# File 'lib/albacore/project.rb', line 55 def executable? sort == ::EXECUTABLE end |
#library? ⇒ Boolean
Is the file a DLL file?
45 46 47 |
# File 'lib/albacore/project.rb', line 45 def library? sort == ::LIBRARY end |
#symbols? ⇒ Boolean
Is the file a symbol file?
65 66 67 |
# File 'lib/albacore/project.rb', line 65 def symbols? sort == ::SYMBOLS end |
#xmldoc? ⇒ Boolean
Is the file a documentation file?
60 61 62 |
# File 'lib/albacore/project.rb', line 60 def xmldoc? sort == ::XMLDOC end |