Module: Usps::Imis::Panels

Defined in:
lib/usps/imis/panels.rb,
lib/usps/imis/panels/vsc.rb,
lib/usps/imis/panels/education.rb,
lib/usps/imis/panels/base_panel.rb

Overview

Namespace for all Panels

Defined Under Namespace

Classes: BasePanel, Education, Vsc

Class Method Summary collapse

Class Method Details

.all(api = Api.new) ⇒ Object

Convenience accessor for available Panel objects

Parameters:

  • api (Api) (defaults to: Api.new)

    Parent to use for making requests



16
17
18
19
20
21
22
# File 'lib/usps/imis/panels.rb', line 16

def self.all(api = Api.new)
  panels = constants.reject { it == :BasePanel }

  Struct
    .new(*panels.map { it.to_s.underscore.to_sym })
    .new(*panels.map { const_get(it).new(api) })
end