Class: AppleSimUtils::Cmd

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCmd

Returns a new instance of Cmd.



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

def initialize
  @path = get_command_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/apple_sim_utils/command.rb', line 30

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

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



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

def path
  @path
end