Class: Rubex::DataType::RubyConstant

Inherits:
RubyObject show all
Defined in:
lib/rubex/data_type/ruby_object/ruby_constant.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.



6
7
8
9
10
11
# File 'lib/rubex/data_type/ruby_object/ruby_constant.rb', line 6

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.



4
5
6
# File 'lib/rubex/data_type/ruby_object/ruby_constant.rb', line 4

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/rubex/data_type/ruby_object/ruby_constant.rb', line 4

def type
  @type
end

Instance Method Details

#ruby_constant?Boolean

Returns:



13
14
15
# File 'lib/rubex/data_type/ruby_object/ruby_constant.rb', line 13

def ruby_constant?
  true
end