class RedisModel::BelongedTo
Internal: Base
class for instance-level RedisModel
attributes. Instances of this object should have reference to parent object.
Attributes
parent[RW]
parent_id[RW]
Public Class Methods
new(attrs = {}, options = {})
click to toggle source
Internal: Instantiates new RedisModel::BelongedTo
object with given options.
options - Options for new object.
:parent - Parent object. :parent_id - ID of parent object.
Returns newly instantiated RedisModel::BelongedTo
object.
# File lib/redis_model/belonged_to.rb, line 15 def initialize(attrs = {}, options = {}) @parent = attrs[:parent] @parent_id = attrs[:parent_id] end