Class: Riddick::Backends::KeyValue::Value

Inherits:
Object
  • Object
show all
Defined in:
lib/riddick/backends/key_value/value.rb

Overview

Generic value class. Purpose is to determine whether a value is a custom translation or predefined.

Direct Known Subclasses

Redis::Value

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ Value

Returns a new instance of Value.



7
8
9
# File 'lib/riddick/backends/key_value/value.rb', line 7

def initialize(string)
  @object = MultiJson.decode string
end

Instance Method Details

#to_sObject

Render the underlaying object (used in the GUI).



12
13
14
# File 'lib/riddick/backends/key_value/value.rb', line 12

def to_s
  @object.to_s
end