Class: RemoteMirrors::Attributes
- Inherits:
-
Object
- Object
- RemoteMirrors::Attributes
- Defined in:
- app/models/remote_mirrors/attributes.rb
Constant Summary collapse
- ALLOWED_ATTRIBUTES =
%i[ url enabled auth_method keep_divergent_refs only_protected_branches ssh_known_hosts user password ].freeze
Instance Method Summary collapse
- #allowed ⇒ Object
-
#initialize(attrs) ⇒ Attributes
constructor
A new instance of Attributes.
- #keys ⇒ Object
Constructor Details
#initialize(attrs) ⇒ Attributes
Returns a new instance of Attributes.
17 18 19 |
# File 'app/models/remote_mirrors/attributes.rb', line 17 def initialize(attrs) @attrs = attrs end |
Instance Method Details
#allowed ⇒ Object
21 22 23 |
# File 'app/models/remote_mirrors/attributes.rb', line 21 def allowed attrs.slice(*keys) end |
#keys ⇒ Object
25 26 27 |
# File 'app/models/remote_mirrors/attributes.rb', line 25 def keys ALLOWED_ATTRIBUTES end |