class RBT::FeedbackBinariesOf

Public Class Methods

new( i = 'ruby', run_already = true ) click to toggle source
#

initialize

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 22
def initialize(
    i           = 'ruby',
    run_already = true
  )
  reset
  set_input(i)
  run if run_already
end

Public Instance Methods

binaries?() click to toggle source
#

binaries?

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 64
def binaries?
  @binaries
end
input?() click to toggle source
#

input?

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 50
def input?
  @input
end
Also aliased as: search_term?
obtain_dataset() click to toggle source
#

obtain_dataset

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 57
def obtain_dataset
  @dataset = RBT::Cookbooks::SanitizeCookbook.new(input?) { :fast }
end
report_binaries() click to toggle source
#

report_binaries

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 71
def report_binaries
  if binaries?.empty?
    opne 'We do not know whether `'+sfancy(search_term?)+
         '` will install any binaries.'
  else
    @binaries.each {|entry|
      e "  #{rev}#{royalblue('-')} #{steelblue(entry)}"
    }
  end
end
reset() click to toggle source
#

reset

#
Calls superclass method RBT::Base#reset
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 34
def reset
  super()
  infer_the_namespace
end
run() click to toggle source
#

run

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 85
def run
  obtain_dataset
  @binaries = @dataset.binaries?
  report_binaries
end
search_term?()
Alias for: input?
set_input(i) click to toggle source
#

set_input

#
# File lib/rbt/utility_scripts/feedback_binaries_of.rb, line 42
def set_input(i)
  i = i.join(' ').strip if i.is_a? Array
  @input = i
end