Module: MQ
- Defined in:
- lib/mq.rb,
lib/mq/query.rb
Defined Under Namespace
Classes: ConversionOptions, Error, Filter, FilterDSL, Options, Query
Class Method Summary collapse
-
.html_to_markdown(content, options = nil) ⇒ String
Convert HTML to Markdown.
-
.run(code, content, options = nil) ⇒ Result
Run an mq query on the provided content.
Class Method Details
.html_to_markdown(content, options = nil) ⇒ String
Convert HTML to Markdown
63 64 65 66 |
# File 'lib/mq.rb', line 63 def html_to_markdown(content, = nil) = &.to_h _html_to_markdown(content, ) end |
.run(code, content, options = nil) ⇒ Result
Run an mq query on the provided content. Accepts either a query string or a Query object.
52 53 54 55 56 |
# File 'lib/mq.rb', line 52 def run(code, content, = nil) query = code.respond_to?(:to_query) ? code.to_query : code = &.to_h _run(query, content, ) end |