Class: TurboRex::CStruct::FieldsProxy
- Inherits:
-
Object
- Object
- TurboRex::CStruct::FieldsProxy
- Defined in:
- lib/turborex/cstruct.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #[](count) ⇒ Object
-
#initialize(name) ⇒ FieldsProxy
constructor
A new instance of FieldsProxy.
- #point_to(cstruct) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name) ⇒ FieldsProxy
Returns a new instance of FieldsProxy.
287 288 289 290 291 |
# File 'lib/turborex/cstruct.rb', line 287 def initialize(name) @name = name @count = 1 @point_to = nil end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
284 285 286 |
# File 'lib/turborex/cstruct.rb', line 284 def count @count end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
285 286 287 |
# File 'lib/turborex/cstruct.rb', line 285 def name @name end |
Instance Method Details
#[](count) ⇒ Object
293 294 295 296 297 |
# File 'lib/turborex/cstruct.rb', line 293 def [](count) @count = count.to_i self end |
#point_to(cstruct) ⇒ Object
303 304 305 |
# File 'lib/turborex/cstruct.rb', line 303 def point_to(cstruct) @point_to = cstruct end |
#to_s ⇒ Object
299 300 301 |
# File 'lib/turborex/cstruct.rb', line 299 def to_s @name.to_s end |