Class: RelaxDB::ViewByDelegator
- Inherits:
-
Delegator
- Object
- Delegator
- RelaxDB::ViewByDelegator
- Defined in:
- lib/relaxdb/view_by_delegator.rb
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #__setobj__(obj) ⇒ Object
-
#initialize(view_name, opts) ⇒ ViewByDelegator
constructor
A new instance of ViewByDelegator.
- #load! ⇒ Object
Constructor Details
#initialize(view_name, opts) ⇒ ViewByDelegator
Returns a new instance of ViewByDelegator.
5 6 7 8 9 |
# File 'lib/relaxdb/view_by_delegator.rb', line 5 def initialize(view_name, opts) super([]) @view_name = view_name @opts = opts end |
Instance Method Details
#__getobj__ ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/relaxdb/view_by_delegator.rb', line 11 def __getobj__ unless @ids @opts[:raw] = true @ids = RelaxDB.doc_ids @view_name, @opts end @ids end |
#__setobj__(obj) ⇒ Object
19 20 21 |
# File 'lib/relaxdb/view_by_delegator.rb', line 19 def __setobj__ obj # Intentionally empty end |