Class: NetCDF::FileParent
- Inherits:
-
Object
- Object
- NetCDF::FileParent
- Defined in:
- lib/netcdf/file.rb
Overview
Parent File for the file hierarchy that includes File and FileWriter.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
-
#home_dir ⇒ Object
readonly
Returns the value of attribute home_dir.
-
#netcdf_elmt ⇒ Object
readonly
Returns the value of attribute netcdf_elmt.
-
#outside_scope ⇒ Object
readonly
Returns the value of attribute outside_scope.
-
#root_group ⇒ Object
readonly
Returns the value of attribute root_group.
Instance Method Summary collapse
-
#global_attributes ⇒ Object
———————————————————————————— Gets a list of all global attributes, i.e, all attributes in the root group ————————————————————————————.
-
#initialize(home_dir, name, outside_scope = nil) ⇒ FileParent
constructor
———————————————————————————— NetCDF File ————————————————————————————.
Constructor Details
#initialize(home_dir, name, outside_scope = nil) ⇒ FileParent
NetCDF File
46 47 48 49 50 |
# File 'lib/netcdf/file.rb', line 46 def initialize(home_dir, name, outside_scope = nil) @home_dir = home_dir @file_name = "#{home_dir}/#{name}.nc" @outside_scope = outside_scope end |
Instance Attribute Details
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
37 38 39 |
# File 'lib/netcdf/file.rb', line 37 def file_name @file_name end |
#home_dir ⇒ Object (readonly)
Returns the value of attribute home_dir.
36 37 38 |
# File 'lib/netcdf/file.rb', line 36 def home_dir @home_dir end |
#netcdf_elmt ⇒ Object (readonly)
Returns the value of attribute netcdf_elmt.
38 39 40 |
# File 'lib/netcdf/file.rb', line 38 def netcdf_elmt @netcdf_elmt end |
#outside_scope ⇒ Object (readonly)
Returns the value of attribute outside_scope.
39 40 41 |
# File 'lib/netcdf/file.rb', line 39 def outside_scope @outside_scope end |
#root_group ⇒ Object (readonly)
Returns the value of attribute root_group.
40 41 42 |
# File 'lib/netcdf/file.rb', line 40 def root_group @root_group end |
Instance Method Details
#global_attributes ⇒ Object
Gets a list of all global attributes, i.e, all attributes in the root group
56 57 58 |
# File 'lib/netcdf/file.rb', line 56 def global_attributes @root_group.attributes end |