Class: HiwaiKaeuta::Subst
- Inherits:
-
Object
- Object
- HiwaiKaeuta::Subst
- Defined in:
- lib/hiwai_kaeuta/subst.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#str ⇒ Object
Returns the value of attribute str.
Instance Method Summary collapse
- #execute(target) ⇒ Object
-
#initialize(index, str) ⇒ Subst
constructor
A new instance of Subst.
Constructor Details
#initialize(index, str) ⇒ Subst
Returns a new instance of Subst.
5 6 7 8 |
# File 'lib/hiwai_kaeuta/subst.rb', line 5 def initialize(index, str) @index = index @str = str end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
3 4 5 |
# File 'lib/hiwai_kaeuta/subst.rb', line 3 def index @index end |
#str ⇒ Object
Returns the value of attribute str.
3 4 5 |
# File 'lib/hiwai_kaeuta/subst.rb', line 3 def str @str end |
Instance Method Details
#execute(target) ⇒ Object
10 11 12 |
# File 'lib/hiwai_kaeuta/subst.rb', line 10 def execute(target) target[index] = str end |