module SoberSwag::Type::Named::ClassMethods

Class Methods Module. Modules that include {SoberSwag::Type::Named} will automatically extend this module.

Public Instance Methods

alias?() click to toggle source

Is this type a “wrapper” for another type?

# File lib/sober_swag/type/named.rb, line 14
def alias?
  false
end
alias_of() click to toggle source

The type this type is a wrapper for

# File lib/sober_swag/type/named.rb, line 20
def alias_of
  nil
end
description(arg = nil) click to toggle source

@overload description()

@return [String] a human-readable description of this type

@overload description(arg)

@param arg [String] a human-readable description of this type
@return [String] `arg`
# File lib/sober_swag/type/named.rb, line 36
def description(arg = nil)
  @description = arg if arg
  @description
end
root_alias() click to toggle source

The “root” type along the alias chain

# File lib/sober_swag/type/named.rb, line 26
def root_alias
  alias_of || self
end