Class: R3EXS::Class::Learning
- Inherits:
-
Object
- Object
- R3EXS::Class::Learning
- Defined in:
- lib/R3EXS/RGSS3_R3EXS.rb
Overview
职业[技能]的数据类
Instance Attribute Summary collapse
-
#index ⇒ Integer
readonly
在原始数组中的索引.
-
#note ⇒ String
备注.
Instance Method Summary collapse
-
#empty? ⇒ Boolean
判断是否为空.
-
#ex_strings ⇒ Array<String>
提取所有的字符串.
-
#in_strings(hash) ⇒ void
将所有的字符串替换为指定的字符串.
-
#initialize(learning, index) ⇒ R3EXS::Class::Learning
constructor
用 RPG::Class::Learning 初始化.
-
#inject_to(learning) ⇒ void
注入到 RPG::Class::Learning 对象.
Constructor Details
#initialize(learning, index) ⇒ R3EXS::Class::Learning
用 RPG::Class::Learning 初始化
1216 1217 1218 1219 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1216 def initialize(learning, index) @index = index @note = learning.note end |
Instance Attribute Details
#index ⇒ Integer (readonly)
在原始数组中的索引
1203 1204 1205 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1203 def index @index end |
Instance Method Details
#empty? ⇒ Boolean
判断是否为空
1249 1250 1251 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1249 def empty? @note.blank? end |
#ex_strings ⇒ Array<String>
提取所有的字符串
1233 1234 1235 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1233 def ex_strings [@note] end |
#in_strings(hash) ⇒ void
This method returns an undefined value.
将所有的字符串替换为指定的字符串
1242 1243 1244 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1242 def in_strings(hash) @note = hash.fetch(@note, @note) end |
#inject_to(learning) ⇒ void
This method returns an undefined value.
注入到 RPG::Class::Learning 对象
1226 1227 1228 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 1226 def inject_to(learning) learning.note = @note end |