Class: Primer::Alpha::Stack::PaddingArg
- Inherits:
-
ResponsiveArg
- Object
- ResponsiveArg
- Primer::Alpha::Stack::PaddingArg
- Defined in:
- app/components/primer/alpha/stack.rb
Overview
Stack’s padding argument. Used internally.
Constant Summary collapse
- DEFAULT =
:none
- OPTIONS =
[ nil, DEFAULT, :condensed, :normal, :spacious ].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) ⇒ PaddingArg
constructor
A new instance of PaddingArg.
Methods inherited from ResponsiveArg
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Constructor Details
#initialize(values) ⇒ PaddingArg
Returns a new instance of PaddingArg.
105 106 107 |
# File 'app/components/primer/alpha/stack.rb', line 105 def initialize(values) @values = fetch_or_fallback_all(OPTIONS, values, DEFAULT) end |
Instance Attribute Details
#values ⇒ Object (readonly)
Returns the value of attribute values.
95 96 97 |
# File 'app/components/primer/alpha/stack.rb', line 95 def values @values end |
Class Method Details
.arg_name ⇒ Object
109 110 111 |
# File 'app/components/primer/alpha/stack.rb', line 109 def self.arg_name :padding end |