Class: Opt::Command::Token Private
- Inherits:
-
Struct
- Object
- Struct
- Opt::Command::Token
- Defined in:
- lib/opt/command.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #inspect ⇒ Object private
- #short? ⇒ Boolean private
- #text? ⇒ Boolean private
- #to_s ⇒ Object private
Instance Method Details
#inspect ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
277 278 279 |
# File 'lib/opt/command.rb', line 277 def inspect "<#{self.class}(#{type}):\"#{self}\">" end |
#short? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
262 263 264 |
# File 'lib/opt/command.rb', line 262 def short? type == :short end |
#text? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
258 259 260 |
# File 'lib/opt/command.rb', line 258 def text? type == :text end |
#to_s ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
266 267 268 269 270 271 272 273 274 275 |
# File 'lib/opt/command.rb', line 266 def to_s case type when :long "--#{value}" when :short "-#{value}" else value end end |