Class: Renalware::Snippets::SnippetQuery
- Inherits:
-
Object
- Object
- Renalware::Snippets::SnippetQuery
- Defined in:
- app/models/renalware/snippets/snippet_query.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#relation ⇒ Object
readonly
Returns the value of attribute relation.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(relation: nil, author:) ⇒ SnippetQuery
constructor
A new instance of SnippetQuery.
Constructor Details
#initialize(relation: nil, author:) ⇒ SnippetQuery
Returns a new instance of SnippetQuery.
8 9 10 11 |
# File 'app/models/renalware/snippets/snippet_query.rb', line 8 def initialize(relation: nil, author:) @relation ||= Snippet.includes(:author).all = end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
6 7 8 |
# File 'app/models/renalware/snippets/snippet_query.rb', line 6 def end |
#relation ⇒ Object (readonly)
Returns the value of attribute relation.
6 7 8 |
# File 'app/models/renalware/snippets/snippet_query.rb', line 6 def relation @relation end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'app/models/renalware/snippets/snippet_query.rb', line 13 def call snippets end |