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 =
/^(link|image|video|audio|include)(:+)?(?![^\/:]+:\/\/|[A-Z]:\/|\/)([^:\[]+)(\[.*\])?$/.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.
13 14 15 16 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 13 def initialize(remark, ) @remark = remark @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 7 def @options end |
#remark ⇒ Object (readonly)
Returns the value of attribute remark.
7 8 9 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 7 def remark @remark end |
Class Method Details
.call(remark, options) ⇒ Object
9 10 11 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 9 def self.call(remark, ) new(remark, ).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/metanorma/plugin/lutaml/express_remarks_decorator.rb', line 18 def call result = remark if ["leveloffset"] result = process_remark_offsets(result, ["leveloffset"].to_i) end if ["relative_path_prefix"] result = update_relative_paths(result, ["relative_path_prefix"]) end result end |