Class: YardSig::Sig
- Inherits:
-
Object
- Object
- YardSig::Sig
- Defined in:
- lib/yard-sig/sig.rb
Constant Summary collapse
- TAG_ORDER =
%w[param yieldparam yieldreturn return].freeze
Instance Method Summary collapse
- #initialize(source, parameters = [], namespace = "") ⇒ self constructor
- #to_tags ⇒ Array<YARD::Tags::Tag>
Constructor Details
#initialize(source, parameters = [], namespace = "") ⇒ self
8 9 10 11 12 |
# File 'lib/yard-sig/sig.rb', line 8 def initialize(source, parameters = [], namespace = "") @source = source @parameters = parameters @namespace = namespace end |
Instance Method Details
#to_tags ⇒ Array<YARD::Tags::Tag>
15 16 17 18 19 20 |
# File 'lib/yard-sig/sig.rb', line 15 def = (rbs_method_type.type) += (rbs_method_type.block.type, within_block: true) if rbs_method_type.block .compact.sort_by { |tag| TAG_ORDER.index(tag.tag_name) } end |