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.
16 17 18 19 20 |
# File 'lib/wifi-wand/models/base_model.rb', line 16 def initialize(exitstatus, command, text) @exitstatus = exitstatus @command = command @text = text end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
14 15 16 |
# File 'lib/wifi-wand/models/base_model.rb', line 14 def command @command end |
#exitstatus ⇒ Object (readonly)
Returns the value of attribute exitstatus.
14 15 16 |
# File 'lib/wifi-wand/models/base_model.rb', line 14 def exitstatus @exitstatus end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
14 15 16 |
# File 'lib/wifi-wand/models/base_model.rb', line 14 def text @text end |
Instance Method Details
#to_h ⇒ Object
26 27 28 |
# File 'lib/wifi-wand/models/base_model.rb', line 26 def to_h { exitstatus: exitstatus, command: command, text: text } end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/wifi-wand/models/base_model.rb', line 22 def to_s "#{self.class.name}: Error code #{exitstatus}, command = #{command}, text = #{text}" end |