Class: ERBLint::Linters::TwoColumnLayoutMigrationCounter::Breakpoints
- Inherits:
-
Object
- Object
- ERBLint::Linters::TwoColumnLayoutMigrationCounter::Breakpoints
- Defined in:
- lib/primer/view_components/linters/two_column_layout_migration_counter.rb
Overview
:nodoc:
Constant Summary collapse
- LABELS =
%i[all sm md lg xl].freeze
Instance Method Summary collapse
-
#initialize ⇒ Breakpoints
constructor
A new instance of Breakpoints.
- #min ⇒ Object
- #min_value ⇒ Object
- #set(breakpoint, value) ⇒ Object
Constructor Details
#initialize ⇒ Breakpoints
Returns a new instance of Breakpoints.
25 26 27 |
# File 'lib/primer/view_components/linters/two_column_layout_migration_counter.rb', line 25 def initialize @map = {} end |
Instance Method Details
#min ⇒ Object
33 34 35 |
# File 'lib/primer/view_components/linters/two_column_layout_migration_counter.rb', line 33 def min LABELS.find { |label| @map[label] } || :all end |
#min_value ⇒ Object
37 38 39 |
# File 'lib/primer/view_components/linters/two_column_layout_migration_counter.rb', line 37 def min_value @map[min] end |
#set(breakpoint, value) ⇒ Object
29 30 31 |
# File 'lib/primer/view_components/linters/two_column_layout_migration_counter.rb', line 29 def set(breakpoint, value) @map[breakpoint] = value end |