Class: Mullet::HTML::ScopeAttributeCommand
- Inherits:
-
Object
- Object
- Mullet::HTML::ScopeAttributeCommand
- Includes:
- AttributeCommand
- Defined in:
- lib/mullet/html/scope_attribute_command.rb
Overview
Operation to set attribute to value resolved from a scope.
Instance Method Summary collapse
-
#get_value(render_context) ⇒ Object
Gets attribute value by looking up variable name.
-
#initialize(attribute_name, variable_name) ⇒ ScopeAttributeCommand
constructor
Constructor.
Methods included from AttributeCommand
Constructor Details
#initialize(attribute_name, variable_name) ⇒ ScopeAttributeCommand
Constructor
15 16 17 18 |
# File 'lib/mullet/html/scope_attribute_command.rb', line 15 def initialize(attribute_name, variable_name) super(attribute_name) @variable_name = variable_name end |
Instance Method Details
#get_value(render_context) ⇒ Object
Gets attribute value by looking up variable name.
25 26 27 |
# File 'lib/mullet/html/scope_attribute_command.rb', line 25 def get_value(render_context) return render_context.get_variable_value(@variable_name) end |