Class: HiwaiKaeuta::Subst

Inherits:
Object
  • Object
show all
Defined in:
lib/hiwai_kaeuta/subst.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#indexObject

Returns the value of attribute index.



3
4
5
# File 'lib/hiwai_kaeuta/subst.rb', line 3

def index
  @index
end

#strObject

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