Class: RgGen::CHeader::Utility::Declaration
- Inherits:
-
Struct
- Object
- Struct
- RgGen::CHeader::Utility::Declaration
- Defined in:
- lib/rggen/c_header/utility/declaration.rb
Instance Attribute Summary collapse
-
#array_size ⇒ Object
Returns the value of attribute array_size.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
Instance Attribute Details
#array_size ⇒ Object
Returns the value of attribute array_size
6 7 8 |
# File 'lib/rggen/c_header/utility/declaration.rb', line 6 def array_size @array_size end |
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/rggen/c_header/utility/declaration.rb', line 6 def name @name end |
#type ⇒ Object
Returns the value of attribute type
6 7 8 |
# File 'lib/rggen/c_header/utility/declaration.rb', line 6 def type @type end |
Instance Method Details
#to_s ⇒ Object
7 8 9 10 11 |
# File 'lib/rggen/c_header/utility/declaration.rb', line 7 def to_s [ type, ' ', name, array_size&.map { |size| "[#{size}]" } ].compact.join end |