Class: HighFive::Thor::Runner

Inherits:
Thor::Runner
  • Object
show all
Defined in:
lib/high_five/thor/runner.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object

Note: because of the way task.run works, there has to be a local definition. Also, we want tasks to work WITH our base namespace if it is included, so that we can use our binary with the same signature we would use thor



18
19
20
21
22
23
24
25
# File 'lib/high_five/thor/runner.rb', line 18

def method_missing(meth, *args)
  meth = meth.to_s
  meth.sub!(/^high_five:/, '')
  # if (!meth.match(/:/))
  #   meth = "high_five:#{meth}"
  # end
  super meth, *args
end

Instance Method Details

#versionObject



27
28
29
# File 'lib/high_five/thor/runner.rb', line 27

def version
  say "High Five v#{HighFive::VERSION}"
end