Sha256: 7bc4398c8a59655ba448c4d26283563449f7f0fe0087a914390127c425682668
Contents?: true
Size: 1.21 KB
Versions: 9
Compression:
Stored size: 1.21 KB
Contents
module SoberSwag module Type ## # Mixin module used to identify types that should be considered # standalone, named types from SoberSwag's perspective. module Named ## # Class Methods Module. # Modules that include {SoberSwag::Type::Named} # will automatically extend this module. module ClassMethods ## # Is this type a "wrapper" for another type? def alias? false end ## # The type this type is a wrapper for def alias_of nil end ## # The "root" type along the alias chain def root_alias alias_of || self end ## # @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` def description(arg = nil) @description = arg if arg @description end end ## # When included, extends {SoberSwag::Type::Named::ClassMethods} def self.included(mod) mod.extend(ClassMethods) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems