Class: CouchDB::Design::ViewsProxy
- Inherits:
-
Object
- Object
- CouchDB::Design::ViewsProxy
- Defined in:
- lib/couchdb/design.rb
Overview
A proxy class for the views property.
Instance Method Summary collapse
- #<<(view) ⇒ Object
- #[](name) ⇒ Object
-
#initialize(design) ⇒ ViewsProxy
constructor
A new instance of ViewsProxy.
Constructor Details
#initialize(design) ⇒ ViewsProxy
Returns a new instance of ViewsProxy.
44 45 46 47 |
# File 'lib/couchdb/design.rb', line 44 def initialize(design) @design = design @design["views"] = { } end |
Instance Method Details
#<<(view) ⇒ Object
49 50 51 |
# File 'lib/couchdb/design.rb', line 49 def <<(view) @design["views"].merge! view.to_hash end |