Class: Rgversion::Instruction
- Inherits:
-
Object
- Object
- Rgversion::Instruction
- Defined in:
- lib/rgversion/instruction.rb
Instance Method Summary collapse
-
#initialize(command) ⇒ Instruction
constructor
A new instance of Instruction.
- #render ⇒ Object
Constructor Details
#initialize(command) ⇒ Instruction
Returns a new instance of Instruction.
3 4 5 |
# File 'lib/rgversion/instruction.rb', line 3 def initialize(command) @command = command end |
Instance Method Details
#render ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rgversion/instruction.rb', line 7 def render if @command.nil? puts "\nWarning: at this moment rgversion doesn't support copy to clipboard feature if your OS isn't macOS or Linux." puts "You can manually copy output above." elsif @command == :xclip puts "\nWarning: unable to copy to clipboard because #{@command} is missed." puts "Try the command below if you are on Ubuntu/Debian:" puts "sudo apt-get install #{@command}" end end |