Class: Fig::Package::Resource
- Inherits:
-
Object
- Object
- Fig::Package::Resource
- Includes:
- Statement
- Defined in:
- lib/fig/package/resource.rb
Overview
Specifies a file (possibly via a URL) that is part of the current package.
Differs from an Archive in that the contents will not be extracted.
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ Resource
constructor
A new instance of Resource.
- #unparse(indent) ⇒ Object
- #urls ⇒ Object
Methods included from Statement
Constructor Details
#initialize(url) ⇒ Resource
Returns a new instance of Resource.
16 17 18 |
# File 'lib/fig/package/resource.rb', line 16 def initialize(url) @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
14 15 16 |
# File 'lib/fig/package/resource.rb', line 14 def url @url end |
Instance Method Details
#unparse(indent) ⇒ Object
24 25 26 |
# File 'lib/fig/package/resource.rb', line 24 def unparse(indent) "#{indent}resource #{url}" end |
#urls ⇒ Object
20 21 22 |
# File 'lib/fig/package/resource.rb', line 20 def urls return [@url] end |