Class: TurboRex::MSRPC::MIDL::Procedure

Inherits:
Object
  • Object
show all
Defined in:
lib/turborex/msrpc/midl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(proc_num) ⇒ Procedure

Returns a new instance of Procedure.



41
42
43
44
45
46
47
# File 'lib/turborex/msrpc/midl.rb', line 41

def initialize(proc_num)
  @proc_num = proc_num
  @name = "Proc#{proc_num}"
  @params = []
  @return_type = nil
  @arity = 0
end

Instance Attribute Details

#arityObject (readonly)

Returns the value of attribute arity.



39
40
41
# File 'lib/turborex/msrpc/midl.rb', line 39

def arity
  @arity
end

#nameObject

Returns the value of attribute name.



36
37
38
# File 'lib/turborex/msrpc/midl.rb', line 36

def name
  @name
end

#paramsObject (readonly)

Returns the value of attribute params.



37
38
39
# File 'lib/turborex/msrpc/midl.rb', line 37

def params
  @params
end

#proc_numObject (readonly)

Returns the value of attribute proc_num.



35
36
37
# File 'lib/turborex/msrpc/midl.rb', line 35

def proc_num
  @proc_num
end

#return_typeObject (readonly)

Returns the value of attribute return_type.



38
39
40
# File 'lib/turborex/msrpc/midl.rb', line 38

def return_type
  @return_type
end

Instance Method Details

#push_param(param) ⇒ Object



49
50
51
52
# File 'lib/turborex/msrpc/midl.rb', line 49

def push_param(param)
  @params << param
  @arity += 1
end

#set_return_type(type) ⇒ Object



54
55
56
# File 'lib/turborex/msrpc/midl.rb', line 54

def set_return_type(type)
  @return_type = type
end

#typedefsObject



58
59
60
# File 'lib/turborex/msrpc/midl.rb', line 58

def typedefs

end