Class: AdfBuilder::Nodes::ImageTag

Inherits:
Node
  • Object
show all
Defined in:
lib/adf_builder/nodes/vehicle_nodes.rb

Instance Attribute Summary

Attributes inherited from Node

#attributes, #children, #tag_name, #value

Instance Method Summary collapse

Methods inherited from Node

#add_child, #method_missing, #remove_children, #respond_to_missing?, #to_xml

Methods included from Validations

included, #validate!

Constructor Details

#initialize(value, width: nil, height: nil, alttext: nil) ⇒ ImageTag

Returns a new instance of ImageTag.



19
20
21
22
23
24
25
26
# File 'lib/adf_builder/nodes/vehicle_nodes.rb', line 19

def initialize(value, width: nil, height: nil, alttext: nil)
  super()
  @tag_name = :imagetag
  @value = value
  @attributes[:width] = width if width
  @attributes[:height] = height if height
  @attributes[:alttext] = alttext if alttext
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AdfBuilder::Nodes::Node