Class: WpaCliRuby::WpaCli::StatusResponse
- Inherits:
-
Object
- Object
- WpaCliRuby::WpaCli::StatusResponse
- Defined in:
- lib/wpa_cli_ruby/wpa_cli.rb
Instance Attribute Summary collapse
-
#interface ⇒ Object
readonly
Returns the value of attribute interface.
Instance Method Summary collapse
-
#initialize(iface, items) ⇒ StatusResponse
constructor
A new instance of StatusResponse.
- #method_missing(meth, *args, &block) ⇒ Object
Constructor Details
#initialize(iface, items) ⇒ StatusResponse
Returns a new instance of StatusResponse.
46 47 48 49 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 46 def initialize(iface, items) @interface = iface @items = items end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 51 def method_missing(meth, *args, &block) if not @items[meth.to_s].nil? # run_find_by_method($1, *args, &block) @items[meth.to_s] else super # You *must* call super if you don't handle the # method, otherwise you'll mess up Ruby's method # lookup. end end |
Instance Attribute Details
#interface ⇒ Object (readonly)
Returns the value of attribute interface.
44 45 46 |
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 44 def interface @interface end |