Class: Debci::ExtraAptSource
- Inherits:
-
Object
- Object
- Debci::ExtraAptSource
- Defined in:
- lib/debci/extra_apt_source.rb
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
-
#signing_key ⇒ Object
readonly
Returns the value of attribute signing_key.
Instance Method Summary collapse
- #allowed?(user) ⇒ Boolean
-
#initialize(entry, allowed_users = [], signing_key = nil) ⇒ ExtraAptSource
constructor
A new instance of ExtraAptSource.
Constructor Details
#initialize(entry, allowed_users = [], signing_key = nil) ⇒ ExtraAptSource
Returns a new instance of ExtraAptSource.
5 6 7 8 9 |
# File 'lib/debci/extra_apt_source.rb', line 5 def initialize(entry, allowed_users = [], signing_key = nil) @entry = entry @allowed_users = allowed_users || [] @signing_key = signing_key end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
3 4 5 |
# File 'lib/debci/extra_apt_source.rb', line 3 def entry @entry end |
#signing_key ⇒ Object (readonly)
Returns the value of attribute signing_key.
3 4 5 |
# File 'lib/debci/extra_apt_source.rb', line 3 def signing_key @signing_key end |
Instance Method Details
#allowed?(user) ⇒ Boolean
11 12 13 |
# File 'lib/debci/extra_apt_source.rb', line 11 def allowed?(user) @allowed_users.include?(user.id) || @allowed_users.empty? end |