Class: RideTheStreetcar::SetProperty
- Inherits:
-
Object
- Object
- RideTheStreetcar::SetProperty
- Includes:
- Streamlined::Renderable
- Defined in:
- lib/ride_the_streetcar/set_property.rb
Instance Method Summary collapse
-
#initialize(object_chain, value) ⇒ SetProperty
constructor
A new instance of SetProperty.
- #template ⇒ Object
Constructor Details
#initialize(object_chain, value) ⇒ SetProperty
Returns a new instance of SetProperty.
5 6 7 8 |
# File 'lib/ride_the_streetcar/set_property.rb', line 5 def initialize(object_chain, value) @object_chain = object_chain @value = value.to_json end |
Instance Method Details
#template ⇒ Object
10 11 12 13 14 15 |
# File 'lib/ride_the_streetcar/set_property.rb', line 10 def template html -> { <<~HTML <sc-set-property name="#{text->{ @object_chain }}" value="#{text->{ @value }}"></sc-set-property> HTML } end |