Class: PgFuncall::FunctionSig

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_funcall/type_map.rb

Constant Summary collapse

FTYPE_CACHE =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, ret_type, arg_sigs) ⇒ FunctionSig

Returns a new instance of FunctionSig.



10
11
12
13
14
# File 'lib/pg_funcall/type_map.rb', line 10

def initialize(name, ret_type, arg_sigs)
  @name     = name.freeze
  @ret_type = ret_type
  @arg_sigs = arg_sigs.sort.freeze
end

Instance Attribute Details

#arg_sigsObject (readonly)

Returns the value of attribute arg_sigs.



8
9
10
# File 'lib/pg_funcall/type_map.rb', line 8

def arg_sigs
  @arg_sigs
end

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/pg_funcall/type_map.rb', line 8

def name
  @name
end

#ret_typeObject (readonly)

Returns the value of attribute ret_type.



8
9
10
# File 'lib/pg_funcall/type_map.rb', line 8

def ret_type
  @ret_type
end

Instance Method Details

#==(other) ⇒ Object



16
17
18
19
20
# File 'lib/pg_funcall/type_map.rb', line 16

def ==(other)
  other.name     == @name
  other.ret_type == @ret_type
  other.arg_sigs == @arg_sigs
end