Exception: WifiWand::BaseModel::OsCommandError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- WifiWand::BaseModel::OsCommandError
- Defined in:
- lib/wifi-wand/models/base_model.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#exitstatus ⇒ Object
readonly
Returns the value of attribute exitstatus.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(exitstatus, command, text) ⇒ OsCommandError
constructor
A new instance of OsCommandError.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(exitstatus, command, text) ⇒ OsCommandError
Returns a new instance of OsCommandError.
17 18 19 20 21 |
# File 'lib/wifi-wand/models/base_model.rb', line 17 def initialize(exitstatus, command, text) @exitstatus = exitstatus @command = command @text = text end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
15 16 17 |
# File 'lib/wifi-wand/models/base_model.rb', line 15 def command @command end |
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
15 16 17 |
# File 'lib/wifi-wand/models/base_model.rb', line 15 def exitstatus @exitstatus end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
15 16 17 |
# File 'lib/wifi-wand/models/base_model.rb', line 15 def text @text end |
Instance Method Details
#to_h ⇒ Object
27 28 29 |
# File 'lib/wifi-wand/models/base_model.rb', line 27 def to_h { exitstatus: exitstatus, command: command, text: text } end |
#to_s ⇒ Object
23 24 25 |
# File 'lib/wifi-wand/models/base_model.rb', line 23 def to_s "#{self.class.name}: Error code #{exitstatus}, command = #{command}, text = #{text}" end |