Class: Markbridge::AST::Attachment
- Defined in:
- lib/markbridge/ast/attachment.rb
Overview
Represents an attachment reference (image/file).
Instance Attribute Summary collapse
-
#alt ⇒ String?
readonly
Optional alt text for the attachment.
-
#filename ⇒ String?
readonly
Optional filename.
-
#id ⇒ String, ...
readonly
Absolute attachment identifier.
-
#index ⇒ Integer?
readonly
Post-relative index.
Instance Method Summary collapse
-
#initialize(id: nil, index: nil, filename: nil, alt: nil) ⇒ Attachment
constructor
Create a new Attachment node.
Constructor Details
#initialize(id: nil, index: nil, filename: nil, alt: nil) ⇒ Attachment
Create a new Attachment node.
34 35 36 37 38 39 |
# File 'lib/markbridge/ast/attachment.rb', line 34 def initialize(id: nil, index: nil, filename: nil, alt: nil) @id = id @index = index @filename = filename @alt = alt end |
Instance Attribute Details
#alt ⇒ String? (readonly)
Returns optional alt text for the attachment.
26 27 28 |
# File 'lib/markbridge/ast/attachment.rb', line 26 def alt @alt end |
#filename ⇒ String? (readonly)
Returns optional filename.
23 24 25 |
# File 'lib/markbridge/ast/attachment.rb', line 23 def filename @filename end |
#id ⇒ String, ... (readonly)
Returns absolute attachment identifier.
17 18 19 |
# File 'lib/markbridge/ast/attachment.rb', line 17 def id @id end |
#index ⇒ Integer? (readonly)
Returns post-relative index.
20 21 22 |
# File 'lib/markbridge/ast/attachment.rb', line 20 def index @index end |