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, define_mode = true) ⇒ 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, define_mode = true) ⇒ Dim
Returns a new instance of Dim.
620 621 622 623 624 625 626 627 628 629 630 |
# File 'lib/io/netcdf.rb', line 620 def initialize (ncfile, name, len, define_mode = true) @ncfile = ncfile @file_id = ncfile.file_id @name = name @len = len if define_mode @dim_id = nc_def_dim(@file_id, @name, @len) else @dim_id = nc_inq_dimid(@file_id, @name) end end |
Instance Attribute Details
#dim_id ⇒ Object (readonly)
Returns the value of attribute dim_id.
632 633 634 |
# File 'lib/io/netcdf.rb', line 632 def dim_id @dim_id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
632 633 634 |
# File 'lib/io/netcdf.rb', line 632 def name @name end |
Instance Method Details
#to_i ⇒ Object
634 635 636 |
# File 'lib/io/netcdf.rb', line 634 def to_i return @len end |