Class: Upkeep::Dependencies::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/upkeep/dependencies.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source:, key:, metadata: {}) ⇒ Base

Returns a new instance of Base.



11
12
13
14
15
# File 'lib/upkeep/dependencies.rb', line 11

def initialize(source:, key:, metadata: {})
  @source = source
  @key = key
  @metadata = 
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



9
10
11
# File 'lib/upkeep/dependencies.rb', line 9

def key
  @key
end

#metadataObject (readonly)

Returns the value of attribute metadata.



9
10
11
# File 'lib/upkeep/dependencies.rb', line 9

def 
  @metadata
end

#sourceObject (readonly)

Returns the value of attribute source.



9
10
11
# File 'lib/upkeep/dependencies.rb', line 9

def source
  @source
end

Instance Method Details

#cache_keyObject



17
18
19
# File 'lib/upkeep/dependencies.rb', line 17

def cache_key
  [source, key]
end

#identity?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/upkeep/dependencies.rb', line 25

def identity?
  false
end

#identity_keyObject



29
30
31
# File 'lib/upkeep/dependencies.rb', line 29

def identity_key
  nil
end

#matches_change?(_change) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/upkeep/dependencies.rb', line 21

def matches_change?(_change)
  false
end

#narrow_frame_safe?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/upkeep/dependencies.rb', line 41

def narrow_frame_safe?
  false
end

#precisionObject



37
38
39
# File 'lib/upkeep/dependencies.rb', line 37

def precision
  :unknown
end

#to_hObject



45
46
47
48
49
50
51
52
53
# File 'lib/upkeep/dependencies.rb', line 45

def to_h
  {
    source: source,
    key: key,
    visibility: visibility,
    precision: precision,
    metadata: 
  }
end

#visibilityObject



33
34
35
# File 'lib/upkeep/dependencies.rb', line 33

def visibility
  :public
end