Class: RailsTextVariableNode
- Inherits:
-
Object
- Object
- RailsTextVariableNode
- Includes:
- TextNode
- Defined in:
- lib/nodes/rails_text_variable_node.rb
Instance Method Summary collapse
-
#initialize(key, value) ⇒ RailsTextVariableNode
constructor
A new instance of RailsTextVariableNode.
- #text_value ⇒ Object
- #to_s ⇒ Object
Methods included from TextNode
#amount_of_ending_whitespace, #amount_of_starting_whitespace, #contains_alpha_characters?, #extract_text, #has_leading_or_trailing_whitespace?, #has_variables?, #html?, #remove_leading_and_trailing_whitespace, #strip_whitespace?, #text?, #top_level?, #white_space?
Methods included from NodeProcessing
Methods included from BaseNode
#shatter?, #shattered_node_list
Constructor Details
#initialize(key, value) ⇒ RailsTextVariableNode
Returns a new instance of RailsTextVariableNode.
4 5 6 7 |
# File 'lib/nodes/rails_text_variable_node.rb', line 4 def initialize( key, value ) @key = key @value = value end |
Instance Method Details
#text_value ⇒ Object
9 10 11 |
# File 'lib/nodes/rails_text_variable_node.rb', line 9 def text_value "%{#{@key}}" end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/nodes/rails_text_variable_node.rb', line 13 def to_s ":#{@key} => (#{@value})" end |