Class: Fig::Package::Archive

Inherits:
Object
  • Object
show all
Includes:
Statement
Defined in:
lib/fig/package/archive.rb

Overview

Specifies an archive file (possibly via a URL) that is part of the current package.

Differs from a Resource in that the contents will be extracted.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Statement

#walk_statements

Constructor Details

#initialize(url) ⇒ Archive

Returns a new instance of Archive.



16
17
18
# File 'lib/fig/package/archive.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/archive.rb', line 14

def url
  @url
end

Instance Method Details

#unparse(indent) ⇒ Object



24
25
26
# File 'lib/fig/package/archive.rb', line 24

def unparse(indent)
  %Q<#{indent}archive "#{url}">
end

#urlsObject



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

def urls
  return [@url]
end