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.
495 496 497 |
# File 'lib/config_o_mat/shared/types.rb', line 495 def initialize(contents) @digest = Digest::SHA256.hexdigest(contents) end |
Instance Attribute Details
#digest ⇒ Object (readonly)
Returns the value of attribute digest.
493 494 495 |
# File 'lib/config_o_mat/shared/types.rb', line 493 def digest @digest end |
Instance Method Details
#eql?(other) ⇒ Boolean
506 507 508 509 510 |
# File 'lib/config_o_mat/shared/types.rb', line 506 def eql?(other) return false if !super(other) return false if other.digest != digest true end |
#hash ⇒ Object
502 503 504 |
# File 'lib/config_o_mat/shared/types.rb', line 502 def hash @digest.hash end |
#validate ⇒ Object
499 500 |
# File 'lib/config_o_mat/shared/types.rb', line 499 def validate end |