Class: Cased::Policy
- Inherits:
-
Object
- Object
- Cased::Policy
- Defined in:
- lib/cased/policy.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #event(id) ⇒ Object
- #events(phrase: nil, variables: {}) ⇒ Object
-
#initialize(api_key:) ⇒ Policy
constructor
A new instance of Policy.
Constructor Details
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
7 8 9 |
# File 'lib/cased/policy.rb', line 7 def api_key @api_key end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/cased/policy.rb', line 7 def client @client end |
Instance Method Details
#event(id) ⇒ Object
18 19 20 21 |
# File 'lib/cased/policy.rb', line 18 def event(id) response = @client.get("events/#{id}") response.body end |