Class: StoplightAdmin::Actions::Home
- Defined in:
- lib/stoplight_admin/actions/home.rb
Direct Known Subclasses
Instance Attribute Summary collapse
Instance Method Summary collapse
- #call ⇒ (StoplightAdmin::LightsRepository::Light)
-
#initialize(lights_stats:, **deps) ⇒ Home
constructor
A new instance of Home.
Constructor Details
#initialize(lights_stats:, **deps) ⇒ Home
Returns a new instance of Home.
12 13 14 15 |
# File 'lib/stoplight_admin/actions/home.rb', line 12 def initialize(lights_stats:, **deps) super(**deps) @lights_stats = lights_stats end |
Instance Attribute Details
#lights_stats=(value) ⇒ Class<StoplightAdmin::LightsStats>
8 9 10 |
# File 'lib/stoplight_admin/actions/home.rb', line 8 def lights_stats @lights_stats end |
Instance Method Details
#call ⇒ (StoplightAdmin::LightsRepository::Light)
18 19 20 21 22 |
# File 'lib/stoplight_admin/actions/home.rb', line 18 def call(*) lights = lights_repository.all stats = lights_stats.call(lights) [lights, stats] end |