Class: CouchFoo::View

Inherits:
Object
  • Object
show all
Defined in:
lib/couch_foo/base.rb

Overview

Simple class encapsulating a view

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, map_function, reduce_function, options, *args) ⇒ View

Returns a new instance of View.



54
55
56
57
58
59
# File 'lib/couch_foo/base.rb', line 54

def initialize(name, map_function, reduce_function, options, *args)
  self.name = name
  self.map_function = map_function
  self.reduce_function = reduce_function
  self.options = options
end

Instance Attribute Details

#map_functionObject

Returns the value of attribute map_function.



53
54
55
# File 'lib/couch_foo/base.rb', line 53

def map_function
  @map_function
end

#nameObject

Returns the value of attribute name.



53
54
55
# File 'lib/couch_foo/base.rb', line 53

def name
  @name
end

#optionsObject

Returns the value of attribute options.



53
54
55
# File 'lib/couch_foo/base.rb', line 53

def options
  @options
end

#reduce_functionObject

Returns the value of attribute reduce_function.



53
54
55
# File 'lib/couch_foo/base.rb', line 53

def reduce_function
  @reduce_function
end