Class: MongoidOccurrenceViews::Event::CreateView
- Inherits:
-
Object
- Object
- MongoidOccurrenceViews::Event::CreateView
show all
- Defined in:
- lib/mongoid_occurrence_views/event/create_view.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(klass) ⇒ CreateView
Returns a new instance of CreateView.
11
12
13
|
# File 'lib/mongoid_occurrence_views/event/create_view.rb', line 11
def initialize(klass)
@klass = klass
end
|
Class Method Details
.call(*args) ⇒ Object
15
16
17
|
# File 'lib/mongoid_occurrence_views/event/create_view.rb', line 15
def self.call(*args)
new(*args).call
end
|
Instance Method Details
#call ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/mongoid_occurrence_views/event/create_view.rb', line 19
def call
CreateMongodbView.call(
name: view_name,
collection: klass.collection.name,
pipeline: pipeline
)
end
|
#pipeline ⇒ Object
27
28
29
|
# File 'lib/mongoid_occurrence_views/event/create_view.rb', line 27
def pipeline
raise NotImplementedError
end
|
#view_name ⇒ Object
31
32
33
|
# File 'lib/mongoid_occurrence_views/event/create_view.rb', line 31
def view_name
raise NotImplementedError
end
|