Class: BSV::KVStore::Entry

Inherits:
Data
  • Object
show all
Defined in:
lib/bsv/kv_store/entry.rb

Overview

An immutable KVStore entry returned from Global#get.

token is populated only when include_token: true is passed to #get. history is populated only when history: true is passed to #get.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:, controller:, protocol_id:, tags:, token: nil, history: nil) ⇒ Entry

Returns a new instance of Entry.



10
11
12
# File 'lib/bsv/kv_store/entry.rb', line 10

def initialize(key:, value:, controller:, protocol_id:, tags:, token: nil, history: nil)
  super
end

Instance Attribute Details

#controllerObject (readonly)

Returns the value of attribute controller

Returns:

  • (Object)

    the current value of controller



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def controller
  @controller
end

#historyObject (readonly)

Returns the value of attribute history

Returns:

  • (Object)

    the current value of history



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def history
  @history
end

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def key
  @key
end

#protocol_idObject (readonly)

Returns the value of attribute protocol_id

Returns:

  • (Object)

    the current value of protocol_id



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def protocol_id
  @protocol_id
end

#tagsObject (readonly)

Returns the value of attribute tags

Returns:

  • (Object)

    the current value of tags



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def tags
  @tags
end

#tokenObject (readonly)

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def token
  @token
end

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



9
10
11
# File 'lib/bsv/kv_store/entry.rb', line 9

def value
  @value
end