class PackagePresenter
Attributes
pkg[RW]
Public Class Methods
new(obj)
click to toggle source
# File lib/cmd/inspect.rb, line 28 def initialize obj @pkg = obj end
Public Instance Methods
flavors()
click to toggle source
# File lib/cmd/inspect.rb, line 40 def flavors flavors_as_string.empty? ? "nil" : flavors_as_string end
flavors_as_string()
click to toggle source
# File lib/cmd/inspect.rb, line 44 def flavors_as_string if @pkg.facts.flavors return @pkg.facts.flavors.join ", " end end
homepage()
click to toggle source
# File lib/cmd/inspect.rb, line 54 def homepage @pkg.facts.homepage or 'n/a' end
is_active?()
click to toggle source
# File lib/cmd/inspect.rb, line 36 def is_active? pkg.is_active? end
manifest()
click to toggle source
# File lib/cmd/inspect.rb, line 62 def manifest @pkg.facts.facts_file end
name()
click to toggle source
# File lib/cmd/inspect.rb, line 32 def name @pkg.name end
upgradeable?()
click to toggle source
# File lib/cmd/inspect.rb, line 58 def upgradeable? @pkg.is_git_repo? end
version()
click to toggle source
# File lib/cmd/inspect.rb, line 50 def version @pkg.facts.version or 'n/a' end