Class: Gelauto::Type

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

Direct Known Subclasses

BooleanType

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ruby_type) ⇒ Type

Returns a new instance of Type.



9
10
11
# File 'lib/gelauto/type.rb', line 9

def initialize(ruby_type)
  @ruby_type = ruby_type
end

Instance Attribute Details

#ruby_typeObject (readonly)

Returns the value of attribute ruby_type.



7
8
9
# File 'lib/gelauto/type.rb', line 7

def ruby_type
  @ruby_type
end

Class Method Details

.introspect(obj) ⇒ Object



3
4
5
# File 'lib/gelauto/type.rb', line 3

def self.introspect(obj)
  new(obj.class)
end

Instance Method Details

#to_sigObject



13
14
15
16
# File 'lib/gelauto/type.rb', line 13

def to_sig
  # i.e. class name
  ruby_type.name
end