Class: TheCity::UserSkillWriter
- Defined in:
- lib/writers/user_skill_writer.rb
Instance Attribute Summary
Attributes inherited from ApiWriter
#error_messages, #response_code
Instance Method Summary collapse
-
#initialize(data) ⇒ UserSkillWriter
constructor
Constructor.
Methods inherited from ApiWriter
Constructor Details
#initialize(data) ⇒ UserSkillWriter
Constructor.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/writers/user_skill_writer.rb', line 8 def initialize(data) @url_action = :post @url_data_path = "/users/#{data[:user_id]}/skills" @url_data_delete_path = "/users/#{data[:user_id]}/skills/#{data[:skill_id] || data[:name]}" # user_id is not an option to submit with this path. data.delete(:user_id) @url_data_params = data end |