Class: Traitify::Client
- Inherits:
-
Object
- Object
- Traitify::Client
- Includes:
- Connection, Model, Overrides, Request, Setup, Configuration
- Defined in:
- lib/traitify/client.rb,
lib/traitify/client/model.rb,
lib/traitify/client/setup.rb,
lib/traitify/client/request.rb,
lib/traitify/client/overrides.rb,
lib/traitify/client/connection.rb
Defined Under Namespace
Modules: Connection, Model, Overrides, Request, Setup
Constant Summary
Constants included from Configuration
Traitify::Configuration::VALID_OPTIONS_KEYS
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #method_missing(method_name, *args, &block) ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
Methods included from Setup
#add_params, #add_path, #set, #set_param
Methods included from Request
Methods included from Overrides
#assessments_override, #locales_override, #perform_overrides, #personality_types_override
Methods included from Model
#base, #create, #destroy, #find, #update
Methods included from Connection
Methods included from Configuration
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
17 18 19 |
# File 'lib/traitify/client.rb', line 17 def method_missing(method_name, *args, &block) base(method_name, *args) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/traitify/client.rb', line 7 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
7 8 9 |
# File 'lib/traitify/client.rb', line 7 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/traitify/client.rb', line 7 def type @type end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
7 8 9 |
# File 'lib/traitify/client.rb', line 7 def verb @verb end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
21 22 23 |
# File 'lib/traitify/client.rb', line 21 def to_hash Hash[instance_variables.collect{ |key| [key.to_s.delete("@"), instance_variable_get(key)] }] end |