Sha256: 4edc79b43b018f324f7182fe6baf0cdaa3603f9fd72a09b97f625638fc46e7ca
Contents?: true
Size: 919 Bytes
Versions: 25
Compression:
Stored size: 919 Bytes
Contents
Data === Everytime you interact with back-end data you will get an instance of LHS::Data. ```ruby Service.where #<LHS::Data @_proxy=#<LHS::Collection>> Service.find(123) #<LHS::Data @_proxy=#<LHS::Item>> ``` ## Internals ** You shold not use LHS internals as consumer. The following explanations are for developing LHS itself! ** ```ruby data = Service.where(entry_id: 123) # Proxy that is used to access the data data._proxy #<LHS::Collection> # Raw data that is underlying data._raw #<Hash> # The parent data.first._proxy #<LHS::Item> data.first._parent._proxy #<LHS::Collection> data.first._parent === data # The root data.first.some_relation.first._proxy #<LHS::Item> data.first._root._proxy #<LHS::Collection> data.first.some_relation.first._root === data # Service that was used to fetch the data data._service #<Service> # The request that was used to fetch the data data._request #<LHC::Request> ```
Version data entries
25 entries across 25 versions & 1 rubygems