Class: Inline::C::Value

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Value

Returns a new instance of Value.



400
401
402
403
# File 'lib/inline_acceleration.rb', line 400

def initialize(data)
  @data = ValueSafe.new()
  @data.value = data
end

Class Method Details

.get_data(source) ⇒ Object



409
410
411
412
413
414
415
416
417
# File 'lib/inline_acceleration.rb', line 409

def self.get_data(source)
  if source.is_a?(self) 
    source.data
  elsif source.nil?
    0
  else
    source
  end
end

Instance Method Details

#dataObject



405
406
407
# File 'lib/inline_acceleration.rb', line 405

def data
  @data.value
end