Class: RubyAsterisk::ARI::Resources::Base
- Inherits:
-
Object
- Object
- RubyAsterisk::ARI::Resources::Base
- Defined in:
- lib/ruby-asterisk/ari/resources/base.rb
Overview
Base class providing shared data access for ARI resource objects. Subclasses receive raw JSON data and a client reference, then expose domain-specific action methods that delegate HTTP calls to the client.
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(data, client) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(data, client) ⇒ Base
Returns a new instance of Base.
12 13 14 15 |
# File 'lib/ruby-asterisk/ari/resources/base.rb', line 12 def initialize(data, client) @data = data @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
10 11 12 |
# File 'lib/ruby-asterisk/ari/resources/base.rb', line 10 def client @client end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
10 11 12 |
# File 'lib/ruby-asterisk/ari/resources/base.rb', line 10 def data @data end |
Instance Method Details
#id ⇒ Object
17 18 19 |
# File 'lib/ruby-asterisk/ari/resources/base.rb', line 17 def id data['id'] end |