Class: Metanorma::Plugin::Lutaml::ExpressRemarksDecorator
- Inherits:
-
Object
- Object
- Metanorma::Plugin::Lutaml::ExpressRemarksDecorator
- Defined in:
- lib/metanorma/plugin/lutaml/express_remarks_decorator.rb
Constant Summary collapse
- RELATIVE_PREFIX_MACRO_REGEXP =
%r{ ^ # Start of line (link|image|video|audio|include) # Capture group 1: content type (:+)? # Capture group 2: optional colons (?! # Negative lookahead [^\/:]+://| # Don't match URLs (http://, etc.) [A-Z]:/| # Don't match Windows paths / # Don't match absolute paths ) # End negative lookahead ([^:\[]+) # Capture group 3: the path/name (\[.*\])? # Capture group 4: optional attribute $ # End of line }x.freeze
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#remark ⇒ Object
readonly
Returns the value of attribute remark.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(remark, options) ⇒ ExpressRemarksDecorator
constructor
A new instance of ExpressRemarksDecorator.
Constructor Details
#initialize(remark, options) ⇒ ExpressRemarksDecorator
Returns a new instance of ExpressRemarksDecorator.
27 28 29 30 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 27 def initialize(remark, ) @remark = remark @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
21 22 23 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 21 def @options end |
#remark ⇒ Object (readonly)
Returns the value of attribute remark.
21 22 23 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 21 def remark @remark end |
Class Method Details
.call(remark, options) ⇒ Object
23 24 25 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 23 def self.call(remark, ) new(remark, ).call end |
Instance Method Details
#call ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 32 def call result = remark if ["relative_path_prefix"] result = update_relative_paths(result, ["relative_path_prefix"]) end result end |