Class: SeisRuby::Data::Cmtsolution

Inherits:
SeisRuby::Data show all
Defined in:
lib/seis_ruby/data/cmtsolution.rb

Defined Under Namespace

Classes: Centroid, Hypocenter

Instance Attribute Summary collapse

Attributes inherited from SeisRuby::Data

#meta_data, #raw_data

Class Method Summary collapse

Instance Method Summary collapse

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

#centroidObject

Returns the value of attribute centroid.



84
85
86
# File 'lib/seis_ruby/data/cmtsolution.rb', line 84

def centroid
  @centroid
end

#hypocenterObject

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