Class: RDKit::RDObject

Inherits:
Object show all
Extended by:
ClassMethods
Defined in:
lib/rdkit/rd_object.rb

Direct Known Subclasses

RDHash, RDList, RDSet

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ClassMethods

create_hash, list, set, string

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/rdkit/rd_object.rb', line 9

def method_missing(method, *args)
  if forwarded_methods.include?(method)
    value.__send__(method, *args)
  else
    super
  end
end

Instance Attribute Details

#encodingObject

Returns the value of attribute encoding.



3
4
5
# File 'lib/rdkit/rd_object.rb', line 3

def encoding
  @encoding
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/rdkit/rd_object.rb', line 3

def type
  @type
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/rdkit/rd_object.rb', line 3

def value
  @value
end

Class Method Details

.forward_to_value(*methods) ⇒ Object



5
6
7
# File 'lib/rdkit/rd_object.rb', line 5

def self.forward_to_value(*methods)
  @forwarded_methods = methods
end