Class: Releases::Links::Params
- Inherits:
-
Object
- Object
- Releases::Links::Params
- Defined in:
- app/services/releases/links/params.rb
Instance Method Summary collapse
- #allowed_params ⇒ Object
-
#initialize(params) ⇒ Params
constructor
A new instance of Params.
Constructor Details
#initialize(params) ⇒ Params
Returns a new instance of Params.
6 7 8 |
# File 'app/services/releases/links/params.rb', line 6 def initialize(params) @params = params.with_indifferent_access end |
Instance Method Details
#allowed_params ⇒ Object
10 11 12 13 14 |
# File 'app/services/releases/links/params.rb', line 10 def allowed_params @allowed_params ||= params.slice(:name, :url, :link_type).tap do |hash| hash[:filepath] = filepath if provided_filepath? end end |