Module: SoberSwag::Type::Named::ClassMethods
- Defined in:
- lib/sober_swag/type/named.rb
Overview
Class Methods Module. Modules that include SoberSwag::Type::Named will automatically extend this module.
Instance Method Summary collapse
-
#alias? ⇒ Boolean
Is this type a "wrapper" for another type?.
-
#alias_of ⇒ Object
The type this type is a wrapper for.
- #description(arg = nil) ⇒ Object
-
#root_alias ⇒ Object
The "root" type along the alias chain.
Instance Method Details
#alias? ⇒ Boolean
Is this type a "wrapper" for another type?
14 15 16 |
# File 'lib/sober_swag/type/named.rb', line 14 def alias? false end |
#alias_of ⇒ Object
The type this type is a wrapper for
20 21 22 |
# File 'lib/sober_swag/type/named.rb', line 20 def alias_of nil end |
#description ⇒ String #description(arg) ⇒ String
36 37 38 39 |
# File 'lib/sober_swag/type/named.rb', line 36 def description(arg = nil) @description = arg if arg @description end |
#root_alias ⇒ Object
The "root" type along the alias chain
26 27 28 |
# File 'lib/sober_swag/type/named.rb', line 26 def root_alias alias_of || self end |