Class: Wee::Brush::ImageTag

Inherits:
GenericSingleTagBrush show all
Defined in:
lib/wee/renderer/html/brushes.rb

Instance Attribute Summary

Attributes inherited from Wee::Brush

#canvas, #parent

Instance Method Summary collapse

Methods inherited from GenericTagBrush

#__action_callback, #__actionurl_callback, #__actionurl_named_callback, #__input_callback, #css_class, #css_class_for, #method_missing, #onclick_callback, #onclick_update

Methods inherited from Wee::Brush

#close

Constructor Details

#initializeImageTag

Returns a new instance of ImageTag.



207
208
209
# File 'lib/wee/renderer/html/brushes.rb', line 207

def initialize
  super("img")
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Wee::Brush::GenericTagBrush

Instance Method Details

#src_for(prop) ⇒ Object

This method construct the src attribute by looking up the property from the current component.



201
202
203
204
205
# File 'lib/wee/renderer/html/brushes.rb', line 201

def src_for(prop)
  val = @canvas.current_component.lookup_property(prop)
  raise "no property found for: <#{ prop }>" if val.nil?
  src(val)
end

#withObject



211
212
213
# File 'lib/wee/renderer/html/brushes.rb', line 211

def with
  super
end