Module: Aptly::Publishable
- Included in:
- Repository, Snapshot
- Defined in:
- lib/aptly/publishable.rb
Instance Method Summary collapse
- #published? ⇒ Boolean
-
#published_in {|pub| ... } ⇒ Array<PublishedRepository>
Lists all PublishedRepositories self is published in.
Instance Method Details
#published? ⇒ Boolean
22 23 24 |
# File 'lib/aptly/publishable.rb', line 22 def published? !published_in.empty? end |
#published_in {|pub| ... } ⇒ Array<PublishedRepository>
Lists all PublishedRepositories self is published in. Namely self must be a source of the published repository in order for it to appear here. This method always returns an array of affected published repositories. If you use this method with a block it will additionally yield each published repository that would appear in the array, making it a shorthand for Array#each.
11 12 13 14 15 16 17 18 19 |
# File 'lib/aptly/publishable.rb', line 11 def published_in Aptly::PublishedRepository.list(connection).select do |pub| next false unless pub.Sources.any? do |src| src.Name == self.Name end yield pub if block_given? true end end |