Class: Puppet::Pops::Serialization::Extension::Comment
- Defined in:
- lib/puppet/pops/serialization/extension.rb
Overview
The class that triggers the use of the COMMENT extension. The payload is comment text
Instance Attribute Summary collapse
- #comment ⇒ Object readonly
Instance Method Summary collapse
- #eql?(o) ⇒ Boolean (also: #==)
- #hash ⇒ Object
-
#initialize(comment) ⇒ Comment
constructor
A new instance of Comment.
Constructor Details
#initialize(comment) ⇒ Comment
Returns a new instance of Comment.
151 152 153 |
# File 'lib/puppet/pops/serialization/extension.rb', line 151 def initialize(comment) @comment = comment end |
Instance Attribute Details
#comment ⇒ Object (readonly)
149 150 151 |
# File 'lib/puppet/pops/serialization/extension.rb', line 149 def comment @comment end |
Instance Method Details
#eql?(o) ⇒ Boolean Also known as: ==
159 160 161 |
# File 'lib/puppet/pops/serialization/extension.rb', line 159 def eql?(o) o.is_a?(Comment) && o.comment == @comment end |
#hash ⇒ Object
155 156 157 |
# File 'lib/puppet/pops/serialization/extension.rb', line 155 def hash @comment.hash end |