Module: FastRuby::BuilderModule

Defined in:
lib/fastruby/builder.rb

Instance Method Summary collapse

Instance Method Details

#build(signature, method_name, noreturn = false) ⇒ Object



168
169
170
# File 'lib/fastruby/builder.rb', line 168

def build(signature, method_name, noreturn = false)
  fastruby_method(method_name.to_sym).build(signature, noreturn)
end

#fastruby_method(mname_) ⇒ Object



190
191
192
193
194
195
# File 'lib/fastruby/builder.rb', line 190

def fastruby_method(mname_)
  mname = mname_.to_sym
  @fastruby_method = Hash.new unless @fastruby_method
  @fastruby_method[mname] = FastRuby::Method.new(mname,self) unless @fastruby_method[mname]
  @fastruby_method[mname]
end

#method_added(method_name) ⇒ Object



183
184
185
186
187
188
# File 'lib/fastruby/builder.rb', line 183

def method_added(method_name)
  if self.respond_to? :clear_method_hash_addresses
    FastRuby.unset_tree(self,method_name)
    self.clear_method_hash_addresses(method_hash(method_name))
  end
end

#method_hash(method_name) ⇒ Object



178
179
180
181
# File 'lib/fastruby/builder.rb', line 178

def method_hash(method_name)
  @method_hash = Hash.new unless @method_hash
  @method_hash[method_name]
end

#register_method_value(method_name, key, value) ⇒ Object



172
173
174
175
176
# File 'lib/fastruby/builder.rb', line 172

def register_method_value(method_name,key,value)
  @method_hash = Hash.new unless @method_hash
  @method_hash[method_name] = Hash.new unless @method_hash[method_name]
  @method_hash[method_name][key] = value
end