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 初始化
338 339 340 341 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 338 def initialize(learning, index) @index = index @note = learning.note end |
Instance Attribute Details
#index ⇒ Integer (readonly)
在原始数组中的索引
325 326 327 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 325 def index @index end |
#note ⇒ String
学习技能注释
330 331 332 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 330 def note @note end |
Instance Method Details
#empty? ⇒ Boolean
判断是否为空
371 372 373 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 371 def empty? @note.to_s.empty? end |
#ex_strings ⇒ Array<String>
提取所有的字符串
355 356 357 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 355 def ex_strings [@note] end |
#in_strings(hash) ⇒ void
This method returns an undefined value.
将所有的字符串替换为指定的字符串
364 365 366 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 364 def in_strings(hash) @note = hash[@note] || @note end |
#inject_to(learning) ⇒ void
This method returns an undefined value.
注入到 RPG::Class::Learning 对象
348 349 350 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 348 def inject_to(learning) learning.note = @note end |