Class: Couchbase::Management::View
- Inherits:
-
Object
- Object
- Couchbase::Management::View
- Defined in:
- lib/couchbase/management/view_index_manager.rb,
/code/couchbase-ruby-client/lib/couchbase/management/view_index_manager.rb
Instance Attribute Summary collapse
-
#map_function ⇒ String
(also: #map)
Map function in javascript as String.
-
#reduce_function ⇒ String
(also: #reduce)
Reduce function in javascript as String.
-
#view ⇒ String
Name of the view.
Instance Method Summary collapse
-
#has_map? ⇒ Boolean
True if map function is defined.
-
#has_reduce? ⇒ Boolean
True if map function is defined.
-
#initialize(map = nil, reduce = nil) {|self| ... } ⇒ View
constructor
A new instance of View.
Constructor Details
#initialize(map = nil, reduce = nil) {|self| ... } ⇒ View
Returns a new instance of View.
215 216 217 218 219 |
# File 'lib/couchbase/management/view_index_manager.rb', line 215 def initialize(map = nil, reduce = nil) @map_function = map @reduce_function = reduce yield self if block_given? end |
Instance Attribute Details
#map_function ⇒ String Also known as: map
Returns map function in javascript as String.
194 195 196 |
# File 'lib/couchbase/management/view_index_manager.rb', line 194 def map_function @map_function end |
#reduce_function ⇒ String Also known as: reduce
Returns reduce function in javascript as String.
198 199 200 |
# File 'lib/couchbase/management/view_index_manager.rb', line 198 def reduce_function @reduce_function end |
#view ⇒ String
Returns name of the view.
191 192 193 |
# File 'lib/couchbase/management/view_index_manager.rb', line 191 def view @view end |
Instance Method Details
#has_map? ⇒ Boolean
Returns true if map function is defined.
202 203 204 |
# File 'lib/couchbase/management/view_index_manager.rb', line 202 def has_map? !@map_function.nil? end |
#has_reduce? ⇒ Boolean
Returns true if map function is defined.
207 208 209 |
# File 'lib/couchbase/management/view_index_manager.rb', line 207 def has_reduce? !@reduce_function.nil? end |