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 初始化
292 293 294 295 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 292 def initialize(learning, index) @index = index @note = learning.note end |
Instance Attribute Details
#index ⇒ Integer (readonly)
在原始数组中的索引
330 331 332 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 330 def index @index end |
#note ⇒ String
学习技能注释
335 336 337 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 335 def note @note end |
Instance Method Details
#empty? ⇒ Boolean
判断是否为空
323 324 325 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 323 def empty? @note.to_s.empty? end |
#ex_strings ⇒ Array<String>
提取所有的字符串
308 309 310 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 308 def ex_strings [@note] end |
#in_strings(hash) ⇒ void
This method returns an undefined value.
将所有的字符串替换为指定的字符串
316 317 318 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 316 def in_strings(hash) @note = hash[@note] || @note end |
#inject_to(learning) ⇒ void
This method returns an undefined value.
注入到 RPG::Class::Learning 对象
301 302 303 |
# File 'lib/R3EXS/RGSS3_R3EXS.rb', line 301 def inject_to(learning) learning.note = @note end |