Class: Store
Overview
Direct Known Subclasses
Constant Summary collapse
- DEFS =
[]
Constants inherited from ErbPP
Instance Attribute Summary collapse
-
#dtype ⇒ Object
readonly
Returns the value of attribute dtype.
-
#macro ⇒ Object
readonly
Returns the value of attribute macro.
-
#tmpl ⇒ Object
readonly
Returns the value of attribute tmpl.
-
#tpclass ⇒ Object
readonly
Returns the value of attribute tpclass.
-
#tpname ⇒ Object
readonly
Returns the value of attribute tpname.
Class Method Summary collapse
Instance Method Summary collapse
- #c_func ⇒ Object
- #c_iter ⇒ Object
- #condition ⇒ Object
- #definition ⇒ Object
-
#initialize(parent, tmpl, tpname, dtype, tpclass, macro) ⇒ Store
constructor
A new instance of Store.
Methods inherited from Function
#c_method, #code, codes, #id_op, #method, #op_map
Methods inherited from ErbPP
#attr_method, #attrs, #check_params, define_attrs, #has_attr?, #load_erb, #method_missing, #method_missing_alias, #parents, #result, #run, #search_method_in_parents
Constructor Details
#initialize(parent, tmpl, tpname, dtype, tpclass, macro) ⇒ Store
Returns a new instance of Store.
279 280 281 282 283 284 285 286 |
# File 'lib/erbpp/narray_def.rb', line 279 def initialize(parent,tmpl,tpname,dtype,tpclass,macro) super(parent,tmpl) @tpname=tpname @dtype=dtype @tpclass=tpclass @macro=macro DEFS.push(self) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ErbPP
Instance Attribute Details
#dtype ⇒ Object (readonly)
Returns the value of attribute dtype.
287 288 289 |
# File 'lib/erbpp/narray_def.rb', line 287 def dtype @dtype end |
#macro ⇒ Object (readonly)
Returns the value of attribute macro.
287 288 289 |
# File 'lib/erbpp/narray_def.rb', line 287 def macro @macro end |
#tmpl ⇒ Object (readonly)
Returns the value of attribute tmpl.
287 288 289 |
# File 'lib/erbpp/narray_def.rb', line 287 def tmpl @tmpl end |
#tpclass ⇒ Object (readonly)
Returns the value of attribute tpclass.
287 288 289 |
# File 'lib/erbpp/narray_def.rb', line 287 def tpclass @tpclass end |
#tpname ⇒ Object (readonly)
Returns the value of attribute tpname.
287 288 289 |
# File 'lib/erbpp/narray_def.rb', line 287 def tpname @tpname end |
Class Method Details
.definitions ⇒ Object
305 306 307 308 309 310 311 |
# File 'lib/erbpp/narray_def.rb', line 305 def self.definitions a = [] DEFS.each do |i| a.push(i) if i.condition end a end |
Instance Method Details
#c_func ⇒ Object
289 290 291 |
# File 'lib/erbpp/narray_def.rb', line 289 def c_func "numo_#{tp}_store_#{tpname}" end |
#c_iter ⇒ Object
293 294 295 |
# File 'lib/erbpp/narray_def.rb', line 293 def c_iter "iter_#{tp}_store_#{tpname}" end |
#condition ⇒ Object
301 302 303 |
# File 'lib/erbpp/narray_def.rb', line 301 def condition "rb_obj_is_kind_of(obj,#{tpclass})" end |
#definition ⇒ Object
297 298 299 |
# File 'lib/erbpp/narray_def.rb', line 297 def definition nil end |