Class: Upkeep::Dependencies::Restored
- Defined in:
- lib/upkeep/dependencies.rb
Instance Attribute Summary collapse
-
#precision ⇒ Object
readonly
Returns the value of attribute precision.
-
#visibility ⇒ Object
readonly
Returns the value of attribute visibility.
Attributes inherited from Base
Instance Method Summary collapse
- #identity? ⇒ Boolean
- #identity_key ⇒ Object
-
#initialize(source:, key:, metadata:, visibility:, precision:) ⇒ Restored
constructor
A new instance of Restored.
Methods inherited from Base
#cache_key, #matches_change?, #narrow_frame_safe?, #to_h
Constructor Details
#initialize(source:, key:, metadata:, visibility:, precision:) ⇒ Restored
Returns a new instance of Restored.
338 339 340 341 342 |
# File 'lib/upkeep/dependencies.rb', line 338 def initialize(source:, key:, metadata:, visibility:, precision:) super(source: source, key: key, metadata: ) @visibility = visibility.to_sym @precision = precision.to_sym end |
Instance Attribute Details
#precision ⇒ Object (readonly)
Returns the value of attribute precision.
354 355 356 |
# File 'lib/upkeep/dependencies.rb', line 354 def precision @precision end |
#visibility ⇒ Object (readonly)
Returns the value of attribute visibility.
354 355 356 |
# File 'lib/upkeep/dependencies.rb', line 354 def visibility @visibility end |
Instance Method Details
#identity? ⇒ Boolean
344 345 346 |
# File 'lib/upkeep/dependencies.rb', line 344 def identity? visibility == :identity_bound end |
#identity_key ⇒ Object
348 349 350 351 352 |
# File 'lib/upkeep/dependencies.rb', line 348 def identity_key return unless identity? { source: source, key: key.fetch(:key), value: key.fetch(:value) } end |