Class: Rprompt::RvmRuby
- Inherits:
-
PromptItem
- Object
- PromptItem
- Rprompt::RvmRuby
- Defined in:
- lib/rprompt.rb
Instance Attribute Summary
Attributes inherited from PromptItem
Instance Method Summary collapse
-
#ruby ⇒ String
Ruby used.
-
#show ⇒ String
Terminal representation of the ruby version.
Methods inherited from PromptItem
Methods included from Deco
Constructor Details
This class inherits a constructor from Rprompt::PromptItem
Instance Method Details
#ruby ⇒ String
Returns ruby used.
87 88 89 90 91 92 93 94 |
# File 'lib/rprompt.rb', line 87 def ruby text = commandResult.chomp if text.include?('@') text.match(/ruby-(.+)@/)[1] else text.gsub!(/ruby-/, '') end end |
#show ⇒ String
Returns terminal representation of the ruby version.
97 98 99 |
# File 'lib/rprompt.rb', line 97 def show termShow({:color => color, :symbol => symbol, :content => ruby}) end |