Class: Usps::Imis::CommandLine::Interface
- Inherits:
-
Object
- Object
- Usps::Imis::CommandLine::Interface
- Defined in:
- lib/usps/imis/command_line/interface.rb
Overview
Command line interface for the Api
Constant Summary collapse
- NAME =
'USPS iMIS API - Ruby'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Interface
constructor
A new instance of Interface.
- #run ⇒ Object
Constructor Details
#initialize ⇒ Interface
Returns a new instance of Interface.
15 16 17 18 19 20 |
# File 'lib/usps/imis/command_line/interface.rb', line 15 def initialize(**) @options = .merge(**) configure! if [:config] logging! end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
11 12 13 |
# File 'lib/usps/imis/command_line/interface.rb', line 11 def @options end |
Class Method Details
.run ⇒ Object
13 |
# File 'lib/usps/imis/command_line/interface.rb', line 13 def self.run(...) = new(...).run |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/usps/imis/command_line/interface.rb', line 22 def run set_member result = simplify(perform!) output { result } result end |