Class: Fig::Package::Resource

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Statement

#walk_statements

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

#urlObject (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

#urlsObject



20
21
22
# File 'lib/fig/package/resource.rb', line 20

def urls
  return [@url]
end