Class: Aptly::PublishedResource
- Inherits:
-
Object
- Object
- Aptly::PublishedResource
- Defined in:
- lib/aptly/publish.rb
Instance Attribute Summary collapse
-
#archlist ⇒ Object
Returns the value of attribute archlist.
-
#component ⇒ Object
Returns the value of attribute component.
-
#dist ⇒ Object
Returns the value of attribute dist.
-
#from_name ⇒ Object
Returns the value of attribute from_name.
-
#from_type ⇒ Object
Returns the value of attribute from_type.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#drop ⇒ Object
Unpublish a currently published resource.
-
#initialize(dist, prefix = '') ⇒ PublishedResource
constructor
Instantiates a new published resource object from an existing published resource.
Constructor Details
#initialize(dist, prefix = '') ⇒ PublishedResource
Instantiates a new published resource object from an existing published resource.
Parameters:
- dist
-
The distribution name
- prefix
-
An optional prefix
Returns:
An Aptly::PublishedResource object
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/aptly/publish.rb', line 121 def initialize dist, prefix='' idx = "#{prefix}#{prefix.empty? ? '' : '/'}#{dist}" published = Aptly::list_published if !published.include? idx raise AptlyError.new "Published resource #{idx} does not exist" end @dist = dist @prefix = prefix @path = published[idx]['path'] @from_name = published[idx]['from_name'] @from_type = published[idx]['from_type'] @component = published[idx]['component'] @archlist = published[idx]['archlist'] end |
Instance Attribute Details
#archlist ⇒ Object
Returns the value of attribute archlist.
100 101 102 |
# File 'lib/aptly/publish.rb', line 100 def archlist @archlist end |
#component ⇒ Object
Returns the value of attribute component.
99 100 101 |
# File 'lib/aptly/publish.rb', line 99 def component @component end |
#dist ⇒ Object
Returns the value of attribute dist.
100 101 102 |
# File 'lib/aptly/publish.rb', line 100 def dist @dist end |
#from_name ⇒ Object
Returns the value of attribute from_name.
99 100 101 |
# File 'lib/aptly/publish.rb', line 99 def from_name @from_name end |
#from_type ⇒ Object
Returns the value of attribute from_type.
99 100 101 |
# File 'lib/aptly/publish.rb', line 99 def from_type @from_type end |
#path ⇒ Object
Returns the value of attribute path.
99 100 101 |
# File 'lib/aptly/publish.rb', line 99 def path @path end |