Class: NCFileWriter::Dim
Instance Attribute Summary collapse
-
#len ⇒ Object
readonly
Returns the value of attribute len.
-
#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.
625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/io/netcdf.rb', line 625 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
#len ⇒ Object (readonly)
Returns the value of attribute len.
637 638 639 |
# File 'lib/io/netcdf.rb', line 637 def len @len end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
637 638 639 |
# File 'lib/io/netcdf.rb', line 637 def name @name end |
Instance Method Details
#to_i ⇒ Object
639 640 641 |
# File 'lib/io/netcdf.rb', line 639 def to_i return @dim_id end |