Class: Loom::Shell::FakeApi

Inherits:
Api
  • Object
show all
Defined in:
lib/loom/shell/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Api

#dry_run?, #local

Constructor Details

#initializeFakeApi

Fake Override



37
38
39
40
# File 'lib/loom/shell/api.rb', line 37

def initialize
  @cmd_executions = []
  @cmd_execution_args = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



43
44
45
46
47
# File 'lib/loom/shell/api.rb', line 43

def method_missing(name, *args, &block)
  @cmd_executions.push name
  @cmd_execution_args.push args
  self
end

Instance Attribute Details

#cmd_execution_argsObject (readonly)

Returns the value of attribute cmd_execution_args.



41
42
43
# File 'lib/loom/shell/api.rb', line 41

def cmd_execution_args
  @cmd_execution_args
end

#cmd_executionsObject (readonly)

Returns the value of attribute cmd_executions.



41
42
43
# File 'lib/loom/shell/api.rb', line 41

def cmd_executions
  @cmd_executions
end