Class: Scopedog::Directives::Base Abstract

Inherits:
YARD::Tags::Directive
  • Object
show all
Defined in:
lib/scopedog/directives/base.rb

Overview

This class is abstract.

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.abstract_classObject

Returns the value of attribute abstract_class.



7
8
9
# File 'lib/scopedog/directives/base.rb', line 7

def abstract_class
  @abstract_class
end

Class Method Details

.abstract_class?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/scopedog/directives/base.rb', line 9

def abstract_class?
  defined?(@abstract_class) && @abstraact_class == true
end

.directive_nameObject



19
20
21
# File 'lib/scopedog/directives/base.rb', line 19

def directive_name
  name.demodulize.underscore.gsub(/_directive$/, '')
end

.inherited(klass) ⇒ Object



13
14
15
16
17
# File 'lib/scopedog/directives/base.rb', line 13

def inherited(klass)
  return if klass.abstract_class?

  YARD::Tags::Library.define_directive klass.directive_name, :with_name, klass
end

Instance Method Details

#callObject



27
# File 'lib/scopedog/directives/base.rb', line 27

def call; end