Class: WebTools::Tool

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Support::ServiceHelper
Defined in:
lib/web_tools/tool.rb

Class Method Summary collapse

Methods included from Support::ServiceHelper

included

Class Method Details

.display_nameObject



37
38
39
# File 'lib/web_tools/tool.rb', line 37

def display_name
  name.split("::").last
end

.dont_show!Object



25
26
27
# File 'lib/web_tools/tool.rb', line 25

def dont_show!
  @dont_show = true
end

.dont_show?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/web_tools/tool.rb', line 29

def dont_show?
  !!@dont_show
end

.file_nameObject



41
42
43
# File 'lib/web_tools/tool.rb', line 41

def file_name
  display_name + ".html"
end

.inherited(subclass) ⇒ Object



20
21
22
23
# File 'lib/web_tools/tool.rb', line 20

def inherited(subclass)
  super
  self.subclasses << subclass
end

.subclassesObject



33
34
35
# File 'lib/web_tools/tool.rb', line 33

def subclasses
  @subclasses ||= []
end