Class: Rubex::DataType::RubyConstant
- Inherits:
-
RubyObject
- Object
- RubyObject
- Rubex::DataType::RubyConstant
- Defined in:
- lib/rubex/data_type/ruby_object/ruby_constant.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name) ⇒ RubyConstant
constructor
A new instance of RubyConstant.
- #ruby_constant? ⇒ Boolean
Methods inherited from RubyObject
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
#name ⇒ Object (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 |
#type ⇒ Object (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
13 14 15 |
# File 'lib/rubex/data_type/ruby_object/ruby_constant.rb', line 13 def ruby_constant? true end |