Class: MilkTea::DebugMap::Function
- Inherits:
-
Data
- Object
- Data
- MilkTea::DebugMap::Function
- Defined in:
- lib/milk_tea/tooling/debug_map.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#linkage_name ⇒ Object
readonly
Returns the value of attribute linkage_name.
-
#locals ⇒ Object
readonly
Returns the value of attribute locals.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#source_path ⇒ Object
readonly
Returns the value of attribute source_path.
Instance Method Summary collapse
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line
22 23 24 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 22 def line @line end |
#linkage_name ⇒ Object (readonly)
Returns the value of attribute linkage_name
22 23 24 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 22 def linkage_name @linkage_name end |
#locals ⇒ Object (readonly)
Returns the value of attribute locals
22 23 24 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 22 def locals @locals end |
#name ⇒ Object (readonly)
Returns the value of attribute name
22 23 24 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 22 def name @name end |
#params ⇒ Object (readonly)
Returns the value of attribute params
22 23 24 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 22 def params @params end |
#source_path ⇒ Object (readonly)
Returns the value of attribute source_path
22 23 24 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 22 def source_path @source_path end |
Instance Method Details
#to_h(base_dir: nil) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/milk_tea/tooling/debug_map.rb', line 23 def to_h(base_dir: nil) payload = { "name" => name, "cName" => linkage_name, "params" => params.map(&:to_h), "locals" => locals.map(&:to_h), } serialized_source_path = DebugMap.path_for_payload(source_path, base_dir) payload["sourcePath"] = serialized_source_path if serialized_source_path payload["line"] = line if line payload end |