Class: Markbridge::AST::Image
- Defined in:
- lib/markbridge/ast/image.rb
Overview
Represents an image element.
Instance Attribute Summary collapse
-
#height ⇒ Integer?
readonly
The image height.
-
#src ⇒ String?
readonly
The image source URL.
-
#width ⇒ Integer?
readonly
The image width.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(src: nil, width: nil, height: nil) ⇒ Image
constructor
Create a new Image element.
Methods inherited from Element
Constructor Details
#initialize(src: nil, width: nil, height: nil) ⇒ Image
Create a new Image element.
27 28 29 30 31 32 |
# File 'lib/markbridge/ast/image.rb', line 27 def initialize(src: nil, width: nil, height: nil) super() @src = src @width = width @height = height end |
Instance Attribute Details
#height ⇒ Integer? (readonly)
Returns the image height.
20 21 22 |
# File 'lib/markbridge/ast/image.rb', line 20 def height @height end |
#src ⇒ String? (readonly)
Returns the image source URL.
14 15 16 |
# File 'lib/markbridge/ast/image.rb', line 14 def src @src end |
#width ⇒ Integer? (readonly)
Returns the image width.
17 18 19 |
# File 'lib/markbridge/ast/image.rb', line 17 def width @width end |