Class: TurboRex::CStruct::FieldsProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/turborex/cstruct.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countObject (readonly)

Returns the value of attribute count.



284
285
286
# File 'lib/turborex/cstruct.rb', line 284

def count
  @count
end

#nameObject (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_sObject



299
300
301
# File 'lib/turborex/cstruct.rb', line 299

def to_s
  @name.to_s
end