Class: FbsimctlRb::Cmd

Inherits:
Object
  • Object
show all
Defined in:
lib/fbsimctl_rb/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCmd

Returns a new instance of Cmd.



5
6
7
# File 'lib/fbsimctl_rb/command.rb', line 5

def initialize
  @fbsim = get_fbsimctl_path
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &_block) ⇒ Object (protected)



30
31
32
33
34
35
36
# File 'lib/fbsimctl_rb/command.rb', line 30

def method_missing(method, *args, &_block)
  if respond_to_missing?
    run(%W(#{@fbsim} #{method}) + args)
  else
    super
  end
end

Instance Attribute Details

#fbsimObject (readonly)

Returns the value of attribute fbsim.



3
4
5
# File 'lib/fbsimctl_rb/command.rb', line 3

def fbsim
  @fbsim
end