Class: LasReader::Curve
- Inherits:
-
Object
- Object
- LasReader::Curve
- Defined in:
- lib/las_reader/curve.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#log_data ⇒ Object
Returns the value of attribute log_data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#unit ⇒ Object
readonly
Returns the value of attribute unit.
Instance Method Summary collapse
- #add(*p) ⇒ Object
-
#initialize(name, unit, api, info) ⇒ Curve
constructor
A new instance of Curve.
Constructor Details
#initialize(name, unit, api, info) ⇒ Curve
Returns a new instance of Curve.
4 5 6 7 8 9 10 |
# File 'lib/las_reader/curve.rb', line 4 def initialize(name,unit,api,info) @name = name @unit = unit @api = api @description = info @log_data = [] end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
2 3 4 |
# File 'lib/las_reader/curve.rb', line 2 def api @api end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
2 3 4 |
# File 'lib/las_reader/curve.rb', line 2 def description @description end |
#log_data ⇒ Object
Returns the value of attribute log_data.
3 4 5 |
# File 'lib/las_reader/curve.rb', line 3 def log_data @log_data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/las_reader/curve.rb', line 2 def name @name end |
#unit ⇒ Object (readonly)
Returns the value of attribute unit.
2 3 4 |
# File 'lib/las_reader/curve.rb', line 2 def unit @unit end |
Instance Method Details
#add(*p) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/las_reader/curve.rb', line 11 def add(*p) p.each do |point| if point.respond_to?(:each) @log_data += point else @log_data << point end end end |