Class: XDry::NMethodStart

Inherits:
Node
  • Object
show all
Defined in:
lib/xdry/parsing/nodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#indent, #pos

Instance Method Summary collapse

Methods inherited from Node

#method_missing, #tagged_with?, #tags, #tags=, #tags_comment

Constructor Details

#initialize(selector_def, ret_type) ⇒ NMethodStart

Returns a new instance of NMethodStart.



117
118
119
# File 'lib/xdry/parsing/nodes.rb', line 117

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_typeObject (readonly)

Returns the value of attribute ret_type.



115
116
117
# File 'lib/xdry/parsing/nodes.rb', line 115

def ret_type
  @ret_type
end

#selector_defObject (readonly)

Returns the value of attribute selector_def.



115
116
117
# File 'lib/xdry/parsing/nodes.rb', line 115

def selector_def
  @selector_def
end

Instance Method Details

#selectorObject



121
122
123
# File 'lib/xdry/parsing/nodes.rb', line 121

def selector
  @selector_def.selector
end

#to_sObject



125
126
127
# File 'lib/xdry/parsing/nodes.rb', line 125

def to_s
  "- (#{@ret_type})#{selector_def}"
end