Class: BOAST::CustomType
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#vector_length ⇒ Object
readonly
Returns the value of attribute vector_length.
Instance Method Summary collapse
- #decl ⇒ Object
-
#initialize(hash = {}) ⇒ CustomType
constructor
A new instance of CustomType.
Constructor Details
#initialize(hash = {}) ⇒ CustomType
Returns a new instance of CustomType.
305 306 307 308 309 310 311 312 |
# File 'lib/BOAST/DataTypes.rb', line 305 def initialize(hash={}) @name = hash[:type_name] @size = hash[:size] @size = 0 if @size.nil? @vector_length = hash[:vector_length] @vector_length = 1 if @vector_length.nil? @total_size = @vector_length*@size end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
304 305 306 |
# File 'lib/BOAST/DataTypes.rb', line 304 def name @name end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
304 305 306 |
# File 'lib/BOAST/DataTypes.rb', line 304 def size @size end |
#vector_length ⇒ Object (readonly)
Returns the value of attribute vector_length.
304 305 306 |
# File 'lib/BOAST/DataTypes.rb', line 304 def vector_length @vector_length end |