Class: RequestParams
- Inherits:
-
ParamsBase
- Object
- Hash
- ParamsBase
- RequestParams
- Defined in:
- lib/params/request_params.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
Class Method Summary collapse
Instance Method Summary collapse
- #[]=(key, val) ⇒ Object
-
#initialize(path) ⇒ RequestParams
constructor
A new instance of RequestParams.
Methods inherited from ParamsBase
#[], #add, #find_or_add, #get, #method_missing, #required
Constructor Details
#initialize(path) ⇒ RequestParams
Returns a new instance of RequestParams.
6 7 8 9 10 |
# File 'lib/params/request_params.rb', line 6 def initialize(path) @file_path = "#{path}/request_data.json" self.merge!(get_request_params) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ParamsBase
Instance Attribute Details
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
4 5 6 |
# File 'lib/params/request_params.rb', line 4 def file_path @file_path end |
Class Method Details
.new_for_request(automation_results_dir, app_name, request_id) ⇒ Object
12 13 14 |
# File 'lib/params/request_params.rb', line 12 def self.new_for_request(automation_results_dir, app_name, request_id) self.new("#{automation_results_dir}/request/#{app_name}/#{request_id}") end |
Instance Method Details
#[]=(key, val) ⇒ Object
16 17 18 19 20 |
# File 'lib/params/request_params.rb', line 16 def []=(key,val) super(key, val) set_request_params end |