Class: R3EXS::StringsInjector::Location
- Inherits:
-
Object
- Object
- R3EXS::StringsInjector::Location
- Defined in:
- lib/R3EXS/ast.rb
Overview
用来记录字符串的位置
Instance Attribute Summary collapse
-
#content ⇒ String
readonly
字符串内容.
-
#length ⇒ Integer
readonly
字符串的长度.
-
#start_offset ⇒ Integer
readonly
字符串在二进制源文件中的起始位置.
Instance Method Summary collapse
Constructor Details
#initialize(start_offset, length, content) ⇒ Location
Note:
start_offset 是字符串在二进制下打开时的位置
121 122 123 124 125 |
# File 'lib/R3EXS/ast.rb', line 121 def initialize(start_offset, length, content) @start_offset = start_offset @length = length @content = content end |
Instance Attribute Details
#content ⇒ String (readonly)
字符串内容
112 113 114 |
# File 'lib/R3EXS/ast.rb', line 112 def content @content end |
#length ⇒ Integer (readonly)
字符串的长度
107 108 109 |
# File 'lib/R3EXS/ast.rb', line 107 def length @length end |
#start_offset ⇒ Integer (readonly)
字符串在二进制源文件中的起始位置
102 103 104 |
# File 'lib/R3EXS/ast.rb', line 102 def start_offset @start_offset end |