Class: Sablon::Statement::Image

Inherits:
Struct
  • Object
show all
Defined in:
lib/sablon/operations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



124
125
126
# File 'lib/sablon/operations.rb', line 124

def block
  @block
end

#image_referenceObject

Returns the value of attribute image_reference

Returns:

  • (Object)

    the current value of image_reference



124
125
126
# File 'lib/sablon/operations.rb', line 124

def image_reference
  @image_reference
end

Instance Method Details

#evaluate(env) ⇒ Object



125
126
127
128
129
# File 'lib/sablon/operations.rb', line 125

def evaluate(env)
  image = image_reference.evaluate(env.context)
  set_local_rid(env, image) if image
  block.replace(image)
end