Class: Udb::DocLink
- Inherits:
-
Object
- Object
- Udb::DocLink
- Defined in:
- lib/udb/doc_link.rb
Instance Method Summary collapse
-
#dst_link ⇒ String
Unique ID of the linked to normative rule.
-
#initialize(dst_link, db_obj) ⇒ DocLink
constructor
A new instance of DocLink.
-
#to_adoc ⇒ String
Asciidoc to create desired link.
Constructor Details
#initialize(dst_link, db_obj) ⇒ DocLink
Returns a new instance of DocLink.
37 38 39 40 41 |
# File 'lib/udb/doc_link.rb', line 37 def initialize(dst_link, db_obj) raise ArgumentError, "Missing documentation link for #{db_obj.name} of kind #{db_obj.kind}" if dst_link.nil? raise ArgumentError, "Need String but was passed a #{dst_link.class}" unless dst_link.is_a?(String) @dst_link = dst_link end |
Instance Method Details
#dst_link ⇒ String
Returns Unique ID of the linked to normative rule.
44 |
# File 'lib/udb/doc_link.rb', line 44 def dst_link = @dst_link |
#to_adoc ⇒ String
Returns Asciidoc to create desired link.
47 48 49 |
# File 'lib/udb/doc_link.rb', line 47 def to_adoc "<<#{@dst_link},#{@dst_link}>>" end |