Method: OpenC3::SortedModel.get
- Defined in:
- lib/openc3/models/sorted_model.rb
.get(start:, scope:) ⇒ String|nil
Returns String of the saved json or nil if start not found.
43 44 45 46 47 |
# File 'lib/openc3/models/sorted_model.rb', line 43 def self.get(start:, scope:) result = Store.zrangebyscore(self.pk(scope), start, start) return JSON.parse(result[0], :allow_nan => true, :create_additions => true) unless result.empty? nil end |