Class: Rubex::DataType::RubyConstant

Inherits:
RubyObject show all
Defined in:
lib/rubex/data_type.rb

Direct Known Subclasses

RubyClass

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RubyObject

#object?, #p_formatter, #to_s

Methods included from Helpers

#==, #base_type, #c_function_ptr?, #char_ptr?, #from_ruby_object, #to_ruby_object

Constructor Details

#initialize(name) ⇒ RubyConstant

Returns a new instance of RubyConstant.



622
623
624
625
626
627
# File 'lib/rubex/data_type.rb', line 622

def initialize name
  @name = name
  # FIXME: make this flexible so that consts set to primitive types can be
  #   easily converted to C types.
  @type = RubyObject.new 
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



620
621
622
# File 'lib/rubex/data_type.rb', line 620

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



620
621
622
# File 'lib/rubex/data_type.rb', line 620

def type
  @type
end

Instance Method Details

#ruby_constant?Boolean

Returns:



629
# File 'lib/rubex/data_type.rb', line 629

def ruby_constant?; true; end