Class: Omgcnb::DisplayAllDeps
- Inherits:
-
Object
- Object
- Omgcnb::DisplayAllDeps
- Defined in:
- lib/omgcnb.rb
Instance Attribute Summary collapse
-
#buildpack ⇒ Object
readonly
Returns the value of attribute buildpack.
-
#io ⇒ Object
readonly
Returns the value of attribute io.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(buildpack, io: STDOUT) ⇒ DisplayAllDeps
constructor
A new instance of DisplayAllDeps.
Constructor Details
#initialize(buildpack, io: STDOUT) ⇒ DisplayAllDeps
Returns a new instance of DisplayAllDeps.
34 35 36 37 |
# File 'lib/omgcnb.rb', line 34 def initialize(buildpack, io: STDOUT) @buildpack = buildpack @io = io end |
Instance Attribute Details
#buildpack ⇒ Object (readonly)
Returns the value of attribute buildpack.
32 33 34 |
# File 'lib/omgcnb.rb', line 32 def buildpack @buildpack end |
#io ⇒ Object (readonly)
Returns the value of attribute io.
32 33 34 |
# File 'lib/omgcnb.rb', line 32 def io @io end |
Instance Method Details
#call ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/omgcnb.rb', line 39 def call io.puts "- #{buildpack.name}" if buildpack.depends_on.any? io.puts "#{buildpack.depends_on(show_optional: true).map {|s| " - #{s}" }.join("\n")}" else io.puts " - (no deps)" end end |