Class: Travis::Artifacts::Artifact
- Inherits:
-
Struct
- Object
- Struct
- Travis::Artifacts::Artifact
- Defined in:
- lib/travis/artifacts/artifact.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination
4 5 6 |
# File 'lib/travis/artifacts/artifact.rb', line 4 def destination @destination end |
#source ⇒ Object
Returns the value of attribute source
4 5 6 |
# File 'lib/travis/artifacts/artifact.rb', line 4 def source @source end |
Instance Method Details
#content_type ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/travis/artifacts/artifact.rb', line 5 def content_type if MIME::Types.type_for(source).any? MIME::Types.type_for(source).first.content_type else 'application/octet-stream' end end |
#read ⇒ Object
13 14 15 |
# File 'lib/travis/artifacts/artifact.rb', line 13 def read File.read(source) end |