Class: MyApp

Inherits:
Thor show all
Defined in:
lib/thor/spec/thor_spec.rb

Instance Attribute Summary

Attributes inherited from Thor

#options

Instance Method Summary collapse

Methods inherited from Thor

[], convert_task_options, default_task, desc, group, group_name, #help, #initialize, install_task, #invoke, invoke, map, maxima, method_options, opts, package_task, spec_task, start, subclass_files, subclasses, tasks

Constructor Details

This class inherits a constructor from Thor

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



59
60
61
# File 'lib/thor/spec/thor_spec.rb', line 59

def method_missing(meth, *args)
  [meth, args]
end

Instance Method Details

#animal(type) ⇒ Object



14
15
16
# File 'lib/thor/spec/thor_spec.rb', line 14

def animal(type)
  [type]
end

#bang(foo) ⇒ Object



42
43
44
# File 'lib/thor/spec/thor_spec.rb', line 42

def bang(foo)
  "bang"
end

#bar(baz, bat) ⇒ Object



26
27
28
# File 'lib/thor/spec/thor_spec.rb', line 26

def bar(baz, bat)
  [baz, bat, options]
end

#baz(bat) ⇒ Object



32
33
34
# File 'lib/thor/spec/thor_spec.rb', line 32

def baz(bat)
  [bat, options]
end

#call_myself_with_wrong_arityObject



47
48
49
# File 'lib/thor/spec/thor_spec.rb', line 47

def call_myself_with_wrong_arity
  call_myself_with_wrong_arity(4)
end

#example_default_taskObject



54
55
56
# File 'lib/thor/spec/thor_spec.rb', line 54

def example_default_task
  "default task"
end

#foo(bar) ⇒ Object



20
21
22
# File 'lib/thor/spec/thor_spec.rb', line 20

def foo(bar)
  [bar, options]
end

#zooObject



9
10
11
# File 'lib/thor/spec/thor_spec.rb', line 9

def zoo
  true
end