Class: SeisRuby::Data::Cmtsolution
- Inherits:
-
SeisRuby::Data
- Object
- SeisRuby::Data
- SeisRuby::Data::Cmtsolution
- Defined in:
- lib/seis_ruby/data/cmtsolution.rb
Defined Under Namespace
Classes: Centroid, Hypocenter
Instance Attribute Summary collapse
-
#centroid ⇒ Object
Returns the value of attribute centroid.
-
#hypocenter ⇒ Object
Returns the value of attribute hypocenter.
Attributes inherited from SeisRuby::Data
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw_data, meta_data) ⇒ Cmtsolution
constructor
A new instance of Cmtsolution.
Constructor Details
#initialize(raw_data, meta_data) ⇒ Cmtsolution
Returns a new instance of Cmtsolution.
78 79 80 81 82 |
# File 'lib/seis_ruby/data/cmtsolution.rb', line 78 def initialize(raw_data, ) @raw_data = raw_data = parse! end |
Instance Attribute Details
#centroid ⇒ Object
Returns the value of attribute centroid.
84 85 86 |
# File 'lib/seis_ruby/data/cmtsolution.rb', line 84 def centroid @centroid end |
#hypocenter ⇒ Object
Returns the value of attribute hypocenter.
83 84 85 |
# File 'lib/seis_ruby/data/cmtsolution.rb', line 83 def hypocenter @hypocenter end |
Class Method Details
.load(raw_data, meta_data) ⇒ Object
74 75 76 |
# File 'lib/seis_ruby/data/cmtsolution.rb', line 74 def self.load(raw_data, ) new(raw_data, ) end |
.load_file(file) ⇒ Object
70 71 72 |
# File 'lib/seis_ruby/data/cmtsolution.rb', line 70 def self.load_file(file) load(File.read_uri(file), file: file) end |