class FFIDB::Parameter
Public Class Methods
new(name, type = nil)
click to toggle source
@param [Symbol, to_sym] name @param [Type] type
Calls superclass method
# File lib/ffidb/parameter.rb, line 12 def initialize(name, type = nil) super(name.to_sym, type ? Type.for(type) : nil) end
Public Instance Methods
<=>(other)
click to toggle source
@param [Parameter] other @return [Integer]
# File lib/ffidb/parameter.rb, line 19 def <=>(other) self.name <=> other.name end
to_h()
click to toggle source
@return [Hash<Symbol, Type>]
# File lib/ffidb/parameter.rb, line 31 def to_h {self.name => self.type} end
to_s()
click to toggle source
@return [String]
# File lib/ffidb/parameter.rb, line 25 def to_s "#{self.name}: #{self.type}" end