Class: NetCDF::FileParent

Inherits:
Object
  • Object
show all
Defined in:
lib/netcdf/file.rb

Overview

Parent File for the file hierarchy that includes File and FileWriter.

Direct Known Subclasses

File, FileWriter

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_dirObject (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_elmtObject (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_scopeObject (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_groupObject (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_attributesObject


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