Class: Primer::Alpha::Stack::DirectionArg
- Inherits:
-
ResponsiveArg
- Object
- ResponsiveArg
- Primer::Alpha::Stack::DirectionArg
- Defined in:
- app/components/primer/alpha/stack.rb
Overview
Stack’s direction argument. Used internally.
Constant Summary collapse
- DEFAULT =
:vertical
- OPTIONS =
[ nil, DEFAULT, :horizontal ].freeze
Constants inherited from ResponsiveArg
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Instance Attribute Summary collapse
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(values) ⇒ DirectionArg
constructor
A new instance of DirectionArg.
Methods inherited from ResponsiveArg
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Constructor Details
#initialize(values) ⇒ DirectionArg
Returns a new instance of DirectionArg.
43 44 45 |
# File 'app/components/primer/alpha/stack.rb', line 43 def initialize(values) @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT) end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
35 36 37 |
# File 'app/components/primer/alpha/stack.rb', line 35 def values @values end |
Class Method Details
.arg_name ⇒ Object
47 48 49 |
# File 'app/components/primer/alpha/stack.rb', line 47 def self.arg_name :direction end |