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.
643 644 645 646 647 |
# File 'lib/bitclust/rrdparser.rb', line 643 def initialize(signature, names, source) @signature = signature @names = names @source = source end |
Instance Attribute Details
#names ⇒ Object (readonly)
Returns the value of attribute names.
650 651 652 |
# File 'lib/bitclust/rrdparser.rb', line 650 def names @names end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
649 650 651 |
# File 'lib/bitclust/rrdparser.rb', line 649 def signature @signature end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
651 652 653 |
# File 'lib/bitclust/rrdparser.rb', line 651 def source @source end |
Instance Method Details
#alias?(other) ⇒ Boolean
657 658 659 660 |
# File 'lib/bitclust/rrdparser.rb', line 657 def alias?(other) @signature.compatible?(other.signature) and not (@names & other.names).empty? end |
#inspect ⇒ Object
653 654 655 |
# File 'lib/bitclust/rrdparser.rb', line 653 def inspect "\#<Chunk #{@signature.klass}#{@signature.type}#{@names.join(',')} #{@source.location}>" end |
#unify(other) ⇒ Object
662 663 664 665 |
# File 'lib/bitclust/rrdparser.rb', line 662 def unify(other) @names |= other.names @source << other.source end |