Class: HerbTr8nLambdaCallNode
- Inherits:
-
Object
- Object
- HerbTr8nLambdaCallNode
- Defined in:
- lib/nodes/herb_tr8n_lambda_call_node.rb
Instance Attribute Summary collapse
-
#original_text ⇒ Object
readonly
Returns the value of attribute original_text.
Instance Method Summary collapse
- #generate_lambda(value) ⇒ Object
-
#initialize(original_text) ⇒ HerbTr8nLambdaCallNode
constructor
A new instance of HerbTr8nLambdaCallNode.
- #text_value ⇒ Object
Constructor Details
#initialize(original_text) ⇒ HerbTr8nLambdaCallNode
Returns a new instance of HerbTr8nLambdaCallNode.
5 6 7 |
# File 'lib/nodes/herb_tr8n_lambda_call_node.rb', line 5 def initialize( original_text ) @original_text = original_text end |
Instance Attribute Details
#original_text ⇒ Object (readonly)
Returns the value of attribute original_text.
3 4 5 |
# File 'lib/nodes/herb_tr8n_lambda_call_node.rb', line 3 def original_text @original_text end |
Instance Method Details
#generate_lambda(value) ⇒ Object
9 10 11 |
# File 'lib/nodes/herb_tr8n_lambda_call_node.rb', line 9 def generate_lambda( value ) "lambda {|text| #{value}}" end |
#text_value ⇒ Object
13 14 15 |
# File 'lib/nodes/herb_tr8n_lambda_call_node.rb', line 13 def text_value '"#{text}"' end |