Class: TTY::Link::HyperlinkParameter Private
- Inherits:
-
Object
- Object
- TTY::Link::HyperlinkParameter
- Defined in:
- lib/tty/link/hyperlink_parameter.rb
Overview
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.
Responsible for representing hyperlink parameter value
Instance Method Summary collapse
-
#always? ⇒ Boolean
Check whether this parameter value is always.
-
#auto? ⇒ Boolean
Check whether this parameter value is auto.
-
#initialize(value) ⇒ HyperlinkParameter
constructor
Create a HyperlinkParameter instance.
-
#never? ⇒ Boolean
Check whether this parameter value is never.
Constructor Details
#initialize(value) ⇒ HyperlinkParameter
Create a TTY::Link::HyperlinkParameter instance
29 30 31 |
# File 'lib/tty/link/hyperlink_parameter.rb', line 29 def initialize(value) @value = validate(value).to_sym end |
Instance Method Details
#always? ⇒ Boolean
Check whether this parameter value is always
42 43 44 |
# File 'lib/tty/link/hyperlink_parameter.rb', line 42 def always? @value == :always end |
#auto? ⇒ Boolean
Check whether this parameter value is auto
55 56 57 |
# File 'lib/tty/link/hyperlink_parameter.rb', line 55 def auto? @value == :auto end |
#never? ⇒ Boolean
Check whether this parameter value is never
68 69 70 |
# File 'lib/tty/link/hyperlink_parameter.rb', line 68 def never? @value == :never end |