Class: XDry::NMethodHeader
Instance Attribute Summary collapse
-
#ret_type ⇒ Object
readonly
Returns the value of attribute ret_type.
-
#selector_def ⇒ Object
readonly
Returns the value of attribute selector_def.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(selector_def, ret_type) ⇒ NMethodHeader
constructor
A new instance of NMethodHeader.
- #selector ⇒ Object
- #to_s ⇒ Object
Methods inherited from Node
#method_missing, #tagged_with?, #tags, #tags=, #tags_comment
Constructor Details
#initialize(selector_def, ret_type) ⇒ NMethodHeader
Returns a new instance of NMethodHeader.
100 101 102 |
# File 'lib/xdry/parsing/nodes.rb', line 100 def initialize selector_def, ret_type @selector_def, @ret_type = selector_def, ret_type end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class XDry::Node
Instance Attribute Details
#ret_type ⇒ Object (readonly)
Returns the value of attribute ret_type.
98 99 100 |
# File 'lib/xdry/parsing/nodes.rb', line 98 def ret_type @ret_type end |
#selector_def ⇒ Object (readonly)
Returns the value of attribute selector_def.
98 99 100 |
# File 'lib/xdry/parsing/nodes.rb', line 98 def selector_def @selector_def end |
Instance Method Details
#selector ⇒ Object
104 105 106 |
# File 'lib/xdry/parsing/nodes.rb', line 104 def selector @selector_def.selector end |
#to_s ⇒ Object
108 109 110 |
# File 'lib/xdry/parsing/nodes.rb', line 108 def to_s "- (#{@ret_type})#{selector_def}" end |