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.
280 281 282 283 284 285 286 287 |
# File 'lib/erbpp/narray_def.rb', line 280 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.
288 289 290 |
# File 'lib/erbpp/narray_def.rb', line 288 def dtype @dtype end |
#macro ⇒ Object (readonly)
Returns the value of attribute macro.
288 289 290 |
# File 'lib/erbpp/narray_def.rb', line 288 def macro @macro end |
#tmpl ⇒ Object (readonly)
Returns the value of attribute tmpl.
288 289 290 |
# File 'lib/erbpp/narray_def.rb', line 288 def tmpl @tmpl end |
#tpclass ⇒ Object (readonly)
Returns the value of attribute tpclass.
288 289 290 |
# File 'lib/erbpp/narray_def.rb', line 288 def tpclass @tpclass end |
#tpname ⇒ Object (readonly)
Returns the value of attribute tpname.
288 289 290 |
# File 'lib/erbpp/narray_def.rb', line 288 def tpname @tpname end |
Class Method Details
.definitions ⇒ Object
306 307 308 309 310 311 312 |
# File 'lib/erbpp/narray_def.rb', line 306 def self.definitions a = [] DEFS.each do |i| a.push(i) if i.condition end a end |
Instance Method Details
#c_func ⇒ Object
290 291 292 |
# File 'lib/erbpp/narray_def.rb', line 290 def c_func "numo_#{tp}_store_#{tpname}" end |
#c_iter ⇒ Object
294 295 296 |
# File 'lib/erbpp/narray_def.rb', line 294 def c_iter "iter_#{tp}_store_#{tpname}" end |
#condition ⇒ Object
302 303 304 |
# File 'lib/erbpp/narray_def.rb', line 302 def condition "rb_obj_is_kind_of(obj,#{tpclass})" end |
#definition ⇒ Object
298 299 300 |
# File 'lib/erbpp/narray_def.rb', line 298 def definition nil end |