Class: Motionscan::Result
- Inherits:
-
Object
- Object
- Motionscan::Result
- Defined in:
- lib/motionscan/result.rb
Instance Method Summary collapse
- #data ⇒ Object
- #imageId ⇒ Object
-
#initialize(msSDKResult) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(msSDKResult) ⇒ Result
Returns a new instance of Result.
5 6 7 |
# File 'lib/motionscan/result.rb', line 5 def initialize(msSDKResult) @msSDKResult = msSDKResult end |
Instance Method Details
#data ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/motionscan/result.rb', line 13 def data error_ptr = Pointer.new(:object) = NSJSONReadingMutableContainers | NSJSONReadingMutableLeaves | NSJSONReadingAllowFragments json = NSJSONSerialization.JSONObjectWithData(base64URLString, options:, error:error_ptr) error = error_ptr[0] error.nil? ? json : decodeImageBase64URLString end |
#imageId ⇒ Object
9 10 11 |
# File 'lib/motionscan/result.rb', line 9 def imageId @msSDKResult.getValue end |