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.
4 5 6 7 |
# File 'lib/generator/constant.rb', line 4 def initialize(params = { }) super @name, @value = get_attr('sym_name'), get_attr('value') end |
Instance Method Details
#to_s ⇒ Object
8 9 10 |
# File 'lib/generator/constant.rb', line 8 def to_s @indent_str + "#{@name} = #{sanitize!(@value)}" end |