Class: WpaCliRuby::WpaCli::StatusResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/wpa_cli_ruby/wpa_cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#interfaceObject (readonly)

Returns the value of attribute interface.



44
45
46
# File 'lib/wpa_cli_ruby/wpa_cli.rb', line 44

def interface
  @interface
end