Class: ConfigOMat::GeneratedTemplate
- Inherits:
-
ConfigItem
- Object
- ConfigItem
- ConfigOMat::GeneratedTemplate
- Defined in:
- lib/config_o_mat/shared/types.rb
Instance Attribute Summary collapse
-
#digest ⇒ Object
readonly
Returns the value of attribute digest.
Attributes inherited from ConfigItem
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(contents) ⇒ GeneratedTemplate
constructor
A new instance of GeneratedTemplate.
- #validate ⇒ Object
Methods inherited from ConfigItem
#==, #error, #errors?, #validate!
Constructor Details
#initialize(contents) ⇒ GeneratedTemplate
Returns a new instance of GeneratedTemplate.
524 525 526 |
# File 'lib/config_o_mat/shared/types.rb', line 524 def initialize(contents) @digest = Digest::SHA256.hexdigest(contents) end |
Instance Attribute Details
#digest ⇒ Object (readonly)
Returns the value of attribute digest.
522 523 524 |
# File 'lib/config_o_mat/shared/types.rb', line 522 def digest @digest end |
Instance Method Details
#eql?(other) ⇒ Boolean
535 536 537 538 539 |
# File 'lib/config_o_mat/shared/types.rb', line 535 def eql?(other) return false if !super(other) return false if other.digest != digest true end |
#hash ⇒ Object
531 532 533 |
# File 'lib/config_o_mat/shared/types.rb', line 531 def hash @digest.hash end |
#validate ⇒ Object
528 529 |
# File 'lib/config_o_mat/shared/types.rb', line 528 def validate end |