Class: Clerq::Services::QueryTemplate
- Defined in:
- lib/clerq/services/query_template.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(template) ⇒ QueryTemplate
constructor
A new instance of QueryTemplate.
Methods inherited from Service
Constructor Details
#initialize(template) ⇒ QueryTemplate
Returns a new instance of QueryTemplate.
15 16 17 18 19 20 21 |
# File 'lib/clerq/services/query_template.rb', line 15 def initialize(template) if !(template.is_a?(String) && !template.empty?) msg = "Invailid argument 'template'" raise ArgumentError, msg end @template = template end |
Instance Method Details
#call ⇒ Object
10 11 12 |
# File 'lib/clerq/services/query_template.rb', line 10 def call Clerq.text_repository.text(@template) end |