Class: RRD::File
- Inherits:
-
Object
- Object
- RRD::File
- Defined in:
- lib/rrd/file.rb
Instance Attribute Summary collapse
-
#data_start ⇒ Object
readonly
Returns the value of attribute data_start.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#reader ⇒ Object
readonly
Returns the value of attribute reader.
Instance Method Summary collapse
- #close ⇒ Object
- #data(rra_index) ⇒ Object
- #fetch(rra_index, options = {}, &block) ⇒ Object
-
#initialize(file) ⇒ File
constructor
A new instance of File.
Constructor Details
Instance Attribute Details
#data_start ⇒ Object (readonly)
Returns the value of attribute data_start.
3 4 5 |
# File 'lib/rrd/file.rb', line 3 def data_start @data_start end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
3 4 5 |
# File 'lib/rrd/file.rb', line 3 def header @header end |
#reader ⇒ Object (readonly)
Returns the value of attribute reader.
3 4 5 |
# File 'lib/rrd/file.rb', line 3 def reader @reader end |
Instance Method Details
#close ⇒ Object
9 10 11 |
# File 'lib/rrd/file.rb', line 9 def close @reader.close if @reader end |
#data(rra_index) ⇒ Object
23 24 25 |
# File 'lib/rrd/file.rb', line 23 def data(rra_index) RRD::Data.new(header.rra[rra_index], reader, header, @data_start) end |
#fetch(rra_index, options = {}, &block) ⇒ Object
27 28 29 |
# File 'lib/rrd/file.rb', line 27 def fetch(rra_index, ={}, &block) data(rra_index).fetch(, &block) end |