Class: FFI::Generator::Constant
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(params = { }) ⇒ Constant
constructor
A new instance of Constant.
- #to_s ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(params = { }) ⇒ Constant
Returns a new instance of Constant.
166 167 168 169 |
# File 'lib/generator/generator.rb', line 166 def initialize(params = { }) super @name, @value = get_attr('sym_name'), get_attr('value') end |
Instance Method Details
#to_s ⇒ Object
170 171 172 |
# File 'lib/generator/generator.rb', line 170 def to_s @indent_str + "#{@name} = #{@value}" end |