Class: Sidetree::CAS::FetchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/sidetree/cas/fetch_result.rb

Constant Summary collapse

CODE_CAS_NOT_REACHABLE =
"cas_not_reachable"
CODE_INVALID_HASH =
"content_hash_invalid"
CODE_MAX_SIZE_EXCEEDED =
"content_exceeds_maximum_allowed_size"
CODE_NOT_FILE =
"content_not_a_file"
CODE_NOT_FOUND =
"content_not_found"
CODE_SUCCESS =
"success"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, content = nil) ⇒ FetchResult

Returns a new instance of FetchResult.



14
15
16
17
# File 'lib/sidetree/cas/fetch_result.rb', line 14

def initialize(code, content = nil)
  @code = code
  @content = content
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



11
12
13
# File 'lib/sidetree/cas/fetch_result.rb', line 11

def code
  @code
end

#contentObject (readonly)

Returns the value of attribute content.



12
13
14
# File 'lib/sidetree/cas/fetch_result.rb', line 12

def content
  @content
end