Class: Kerbi::Cli::ReleaseSerializer
Instance Attribute Summary
#context, #object, #parent_object
Instance Method Summary
collapse
associations, #attribute_value, attributes, has_attributes, has_many, has_one, header_titles, #initialize, #key, #limit_has_many, possessions, #serialize, serialize, #serialize_associations, #serialize_flat_attrs, serialize_many, #serialize_possessions, #serialized_relation_value
Instance Method Details
#backend ⇒ Object
17
18
19
|
# File 'lib/cli/release_serializer.rb', line 17
def backend
object.class.type_signature
end
|
#broken_txt ⇒ Object
41
42
43
|
# File 'lib/cli/release_serializer.rb', line 41
def broken_txt
"ERR"
end
|
#latest ⇒ Object
33
34
35
36
37
38
39
|
# File 'lib/cli/release_serializer.rb', line 33
def latest
if object.working?
object.entry_set.latest&.tag
else
broken_txt
end
end
|
#name ⇒ Object
13
14
15
|
# File 'lib/cli/release_serializer.rb', line 13
def name
object.release_name
end
|
#resource ⇒ Object
21
22
23
|
# File 'lib/cli/release_serializer.rb', line 21
def resource
object.resource_name
end
|
#states ⇒ Object
25
26
27
28
29
30
31
|
# File 'lib/cli/release_serializer.rb', line 25
def states
if object.working?
object.entries.count
else
broken_txt
end
end
|