Class: NCFileWriter::Dim
Instance Attribute Summary collapse
-
#dim_id ⇒ Object
readonly
Returns the value of attribute dim_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(ncfile, name, len) ⇒ Dim
constructor
A new instance of Dim.
- #to_i ⇒ Object
Methods included from NC
nc_decode, nc_put_att_simple, nc_put_var_all
Constructor Details
#initialize(ncfile, name, len) ⇒ Dim
Returns a new instance of Dim.
458 459 460 461 462 463 464 |
# File 'lib/io/netcdf.rb', line 458 def initialize (ncfile, name, len) @ncfile = ncfile @file_id = ncfile.file_id @name = name @len = len @dim_id = nc_def_dim(@file_id, @name, @len) end |
Instance Attribute Details
#dim_id ⇒ Object (readonly)
Returns the value of attribute dim_id.
466 467 468 |
# File 'lib/io/netcdf.rb', line 466 def dim_id @dim_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
466 467 468 |
# File 'lib/io/netcdf.rb', line 466 def name @name end |
Instance Method Details
#to_i ⇒ Object
468 469 470 |
# File 'lib/io/netcdf.rb', line 468 def to_i return @len end |