Class: RackMotion::ConnectionDelegate
- Inherits:
-
Object
- Object
- RackMotion::ConnectionDelegate
- Defined in:
- lib/project/RackMotion.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#semaphore ⇒ Object
readonly
Returns the value of attribute semaphore.
Instance Method Summary collapse
- #connection(connection, didReceiveResponse: response) ⇒ Object
- #connectionDidFinishLoading(connection) ⇒ Object
-
#initialize ⇒ ConnectionDelegate
constructor
A new instance of ConnectionDelegate.
Constructor Details
#initialize ⇒ ConnectionDelegate
Returns a new instance of ConnectionDelegate.
88 89 90 91 |
# File 'lib/project/RackMotion.rb', line 88 def initialize @semaphore = Dispatch::Semaphore.new(0) @data = NSMutableData.new end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
86 87 88 |
# File 'lib/project/RackMotion.rb', line 86 def data @data end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
86 87 88 |
# File 'lib/project/RackMotion.rb', line 86 def response @response end |
#semaphore ⇒ Object (readonly)
Returns the value of attribute semaphore.
86 87 88 |
# File 'lib/project/RackMotion.rb', line 86 def semaphore @semaphore end |
Instance Method Details
#connection(connection, didReceiveResponse: response) ⇒ Object
93 94 95 |
# File 'lib/project/RackMotion.rb', line 93 def connection(connection, didReceiveData: data) @data.appendData(data) end |
#connectionDidFinishLoading(connection) ⇒ Object
101 102 103 |
# File 'lib/project/RackMotion.rb', line 101 def connectionDidFinishLoading(connection) @semaphore.signal end |