Class: SFRP::Mono::DSL::FuncProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/sfrp/mono/dsl.rb

Instance Method Summary collapse

Constructor Details

#initializeFuncProxy

Returns a new instance of FuncProxy.



90
91
92
93
# File 'lib/sfrp/mono/dsl.rb', line 90

def initialize
  @param_type_strs = []
  @param_strs = []
end

Instance Method Details

#exp(&exp_block) ⇒ Object



100
101
102
103
# File 'lib/sfrp/mono/dsl.rb', line 100

def exp(&exp_block)
  @exp = exp_block.call if exp_block
  @exp
end

#ffi_str(str = nil) ⇒ Object



105
106
107
108
# File 'lib/sfrp/mono/dsl.rb', line 105

def ffi_str(str = nil)
  @ffi_str = str if str
  @ffi_str
end

#ftype(return_type_str) ⇒ Object



114
115
116
# File 'lib/sfrp/mono/dsl.rb', line 114

def ftype(return_type_str)
  Function::FType.new(@param_type_strs, return_type_str)
end

#param(type_str, param_str) ⇒ Object



95
96
97
98
# File 'lib/sfrp/mono/dsl.rb', line 95

def param(type_str, param_str)
  @param_type_strs << type_str
  @param_strs << param_str
end

#param_strsObject



110
111
112
# File 'lib/sfrp/mono/dsl.rb', line 110

def param_strs
  @param_strs
end