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.
4 5 6 7 8 |
# File 'lib/params/request_params.rb', line 4 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.
2 3 4 |
# File 'lib/params/request_params.rb', line 2 def file_path @file_path end |
Class Method Details
.new_for_request(automation_results_dir, app_name, request_id) ⇒ Object
10 11 12 |
# File 'lib/params/request_params.rb', line 10 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
14 15 16 17 18 |
# File 'lib/params/request_params.rb', line 14 def []=(key,val) super(key, val) set_request_params end |