Class: BitClust::RRDParser::Chunk
Instance Attribute Summary collapse
-
#names ⇒ Object
readonly
Returns the value of attribute names.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #alias?(other) ⇒ Boolean
-
#initialize(signature, names, source) ⇒ Chunk
constructor
A new instance of Chunk.
- #inspect ⇒ Object
- #unify(other) ⇒ Object
Constructor Details
#initialize(signature, names, source) ⇒ Chunk
Returns a new instance of Chunk.
477 478 479 480 481 |
# File 'lib/bitclust/rrdparser.rb', line 477 def initialize(signature, names, source) @signature = signature @names = names @source = source end |
Instance Attribute Details
#names ⇒ Object (readonly)
Returns the value of attribute names.
484 485 486 |
# File 'lib/bitclust/rrdparser.rb', line 484 def names @names end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
483 484 485 |
# File 'lib/bitclust/rrdparser.rb', line 483 def signature @signature end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
485 486 487 |
# File 'lib/bitclust/rrdparser.rb', line 485 def source @source end |
Instance Method Details
#alias?(other) ⇒ Boolean
491 492 493 494 |
# File 'lib/bitclust/rrdparser.rb', line 491 def alias?(other) @signature.compatible?(other.signature) and not (@names & other.names).empty? end |
#inspect ⇒ Object
487 488 489 |
# File 'lib/bitclust/rrdparser.rb', line 487 def inspect "\#<Chunk #{@signature.klass}#{@signature.type}#{@names.join(',')} #{@source.location}>" end |
#unify(other) ⇒ Object
496 497 498 499 |
# File 'lib/bitclust/rrdparser.rb', line 496 def unify(other) @names |= other.names @source << other.source end |