module Unparser::AbstractType::AbstractMethodDeclarations

def abstract_method(*names)

Other tags:
    Api: - public

Returns:
  • (self) -

Parameters:
  • names (Array<#to_s>) --
def abstract_method(*names)
  names.each(&method(:create_abstract_instance_method))
  self
end

def abstract_singleton_method(*names)

Other tags:
    Api: - private

Returns:
  • (self) -

Parameters:
  • names (Array<#to_s>) --
def abstract_singleton_method(*names)
  names.each(&method(:create_abstract_singleton_method))
  self
end

def create_abstract_instance_method(name)

Other tags:
    Api: - private

Returns:
  • (undefined) -

Parameters:
  • name (#to_s) --
def create_abstract_instance_method(name)
  define_method(name) do |*|
    fail NotImplementedError, "#{self.class}##{name} is not implemented"
  end
end

def create_abstract_singleton_method(name)

Other tags:
    Api: - private

Returns:
  • (undefined) -

Parameters:
  • name (#to_s) --
def create_abstract_singleton_method(name)
  define_singleton_method(name) do |*|
    fail NotImplementedError, "#{self}.#{name} is not implemented"
  end
end