Class: YARD::Tags::OverloadTag
- Inherits:
-
Tag
- Object
- Tag
- YARD::Tags::OverloadTag
show all
- Defined in:
- lib/yard/tags/overload_tag.rb
Instance Attribute Summary collapse
Attributes inherited from Tag
#object, #tag_name, #text, #types
Instance Method Summary
collapse
Constructor Details
Returns a new instance of OverloadTag.
[View source]
6
7
8
9
10
|
# File 'lib/yard/tags/overload_tag.rb', line 6
def initialize(tag_name, text)
super(tag_name, nil)
parse_tag(text)
parse_signature
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
permalink
#method_missing(*args, &block) ⇒ Object
[View source]
26
27
28
|
# File 'lib/yard/tags/overload_tag.rb', line 26
def method_missing(*args, &block)
object.send(*args, &block)
end
|
Instance Attribute Details
permalink
#docstring ⇒ Object
Returns the value of attribute docstring.
4
5
6
|
# File 'lib/yard/tags/overload_tag.rb', line 4
def docstring
@docstring
end
|
permalink
#parameters ⇒ Object
Returns the value of attribute parameters.
4
5
6
|
# File 'lib/yard/tags/overload_tag.rb', line 4
def parameters
@parameters
end
|
permalink
#signature ⇒ Object
Returns the value of attribute signature.
4
5
6
|
# File 'lib/yard/tags/overload_tag.rb', line 4
def signature
@signature
end
|
Instance Method Details
permalink
#has_tag?(name) ⇒ Boolean
[View source]
14
|
# File 'lib/yard/tags/overload_tag.rb', line 14
def has_tag?(name) docstring.has_tag?(name) end
|
permalink
#is_a?(other) ⇒ Boolean
Also known as:
kind_of?
[View source]
34
35
36
|
# File 'lib/yard/tags/overload_tag.rb', line 34
def is_a?(other)
object.is_a?(other) || self.class >= other.class || false
end
|
permalink
#name(prefix = false) ⇒ Object
[View source]
21
22
23
24
|
# File 'lib/yard/tags/overload_tag.rb', line 21
def name(prefix = false)
return @name unless prefix
object.scope == :class ? @name.to_s : "#{object.send(:sep)}#{@name}"
end
|
permalink
#object=(value) ⇒ Object
[View source]
16
17
18
19
|
# File 'lib/yard/tags/overload_tag.rb', line 16
def object=(value)
super(value)
docstring.object = value
end
|
permalink
#tag(name) ⇒ Object
[View source]
12
|
# File 'lib/yard/tags/overload_tag.rb', line 12
def tag(name) docstring.tag(name) end
|
[View source]
13
|
# File 'lib/yard/tags/overload_tag.rb', line 13
def tags(name = nil) docstring.tags(name) end
|
[View source]
30
31
32
|
# File 'lib/yard/tags/overload_tag.rb', line 30
def type
object.type
end
|