2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/messagepassing.rb', line 2
def self.write(name,title,model,brand,condition,finish,price,value)
if value == 1
message = "Hi #{name}, #{title}, was added to the site. This #{model}, was purely #{brand}, and #{condition} with #{finish}, finally price is #{price}. please review "
return message
elsif value == 2
message = "Hi #{name}, #{title}, was updated in the site. This #{model}, was purely #{brand}, and #{condition} with #{finish}, finally price is #{price}. please review "
return message
elsif value == 3
message = "Hi #{name}, #{title}, was deleted from your site. This #{model}, was purely #{brand}, and #{condition} with #{finish}, finally price is #{price}. please review "
return message
else
message = "nil"
return message
end
end
|