Class: Symbol
- Inherits:
-
Object
- Object
- Symbol
- Defined in:
- lib/ruby-unix-now.rb
Instance Method Summary collapse
Instance Method Details
#to_cmd_opt ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/ruby-unix-now.rb', line 28 def to_cmd_opt string = to_s if string.length == 1 '-' + string else '--' + string end end |