class Nexaas::Async::Collector::Result
Attributes
id[R]
object[R]
scope_id[R]
storage[R]
Public Class Methods
new(scope_id, id)
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 16 def initialize(scope_id, id) @scope_id = scope_id @id = id @storage = Storage.new end
Public Instance Methods
content()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 22 def content Base64.decode64(object['content']) if content_is_ready? end
content_is_ready?()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 26 def content_is_ready? object && object['scope_id'] == scope_id && object['content'] end
content_type()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 38 def content_type object && object.dig('file', 'content_type') end
extension()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 42 def extension object && object.dig('file', 'extension') end
filename()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 34 def filename object && object.dig('file', 'name') end
is_file?()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 30 def is_file? object && !object['file'].nil? end
Private Instance Methods
namespace()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 58 def namespace Nexaas::Async::Collector.redis_namespace end
url()
click to toggle source
# File lib/nexaas/async/collector/result.rb, line 54 def url Nexaas::Async::Collector.redis_url end