Class: DeepCover::Node::SendOperatorAssign
- Inherits:
-
DeepCover::Node
- Object
- DeepCover::Node
- DeepCover::Node::SendOperatorAssign
- Defined in:
- lib/deep_cover/node/assignments.rb
Constant Summary
Constants inherited from DeepCover::Node
CLASSES, Complex, Cvasgn, Dsym, Erange, Float, Int, Ivar, Kwarg, Kwoptarg, Kwrestarg, OrAsgn, Rational, Sym, True, Zsuper
Instance Attribute Summary
Attributes inherited from DeepCover::Node
#base_node, #children, #index, #next_sibling, #parent, #previous_sibling
Instance Method Summary collapse
Methods inherited from DeepCover::Node
[], #[], atom, #children_nodes, #covered_code, define_module_class, #each_node, #fancy_type, #find_all, has_evaluated_segments, inherited, #initialize, #simple_literal?, #to_s, #type
Methods included from Memoize
Constructor Details
This class inherits a constructor from DeepCover::Node
Instance Method Details
#loc_hash ⇒ Object
218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/deep_cover/node/assignments.rb', line 218 def loc_hash base = super hash = {expression: base[:expression], begin: base[:begin], end: base[:end], dot: base[:dot]} selector = base[:selector] if [:[], :[]=].include?(method_name) hash[:selector_begin] = selector.resize(1) hash[:selector_end] = Parser::Source::Range.new(selector.source_buffer, selector.end_pos - 1, selector.end_pos) else hash[:selector_begin] = base[:selector] end hash end |