Class: Couchbase::Management::View
- Inherits:
-
Object
- Object
- Couchbase::Management::View
- Defined in:
- lib/couchbase/management/view_index_manager.rb,
/home/runner/work/couchbase-ruby-client/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.
308 309 310 311 312 |
# File 'lib/couchbase/management/view_index_manager.rb', line 308 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.
287 288 289 |
# File 'lib/couchbase/management/view_index_manager.rb', line 287 def map_function @map_function end |
#reduce_function ⇒ String Also known as: reduce
Returns reduce function in javascript as String.
291 292 293 |
# File 'lib/couchbase/management/view_index_manager.rb', line 291 def reduce_function @reduce_function end |
#view ⇒ String
Returns name of the view.
284 285 286 |
# File 'lib/couchbase/management/view_index_manager.rb', line 284 def view @view end |
Instance Method Details
#has_map? ⇒ Boolean
Returns true if map function is defined.
295 296 297 |
# File 'lib/couchbase/management/view_index_manager.rb', line 295 def has_map? !@map_function.nil? end |
#has_reduce? ⇒ Boolean
Returns true if map function is defined.
300 301 302 |
# File 'lib/couchbase/management/view_index_manager.rb', line 300 def has_reduce? !@reduce_function.nil? end |