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.
278 279 280 |
# File 'lib/opt/command.rb', line 278 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.
263 264 265 |
# File 'lib/opt/command.rb', line 263 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.
259 260 261 |
# File 'lib/opt/command.rb', line 259 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.
267 268 269 270 271 272 273 274 275 276 |
# File 'lib/opt/command.rb', line 267 def to_s case type when :long "--#{value}" when :short "-#{value}" else value end end |