Class: Exotel::Resource
- Inherits:
-
Object
- Object
- Exotel::Resource
- Defined in:
- lib/exotel-api-client/resource.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #append(key, options) ⇒ Object
-
#initialize ⇒ Resource
constructor
A new instance of Resource.
- #url(sid) ⇒ Object
Constructor Details
#initialize ⇒ Resource
Returns a new instance of Resource.
5 6 7 |
# File 'lib/exotel-api-client/resource.rb', line 5 def initialize @keys = []; @options = {} end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/exotel-api-client/resource.rb', line 3 def @options end |
Instance Method Details
#append(key, options) ⇒ Object
9 10 11 |
# File 'lib/exotel-api-client/resource.rb', line 9 def append(key,) @keys << key; @options.merge!() if end |
#url(sid) ⇒ Object
13 14 15 |
# File 'lib/exotel-api-client/resource.rb', line 13 def url sid @url = "https://twilix.exotel.in/" + "v1/Accounts/" + "#{sid}/" + @keys.join("/") end |