https://www.bootrails.com/blog/rails-7-hotwire-a-tutorial/
https://www.colby.so/posts/using-hotwire-and-rails-to-build-a-commenting-system
irb(main):043:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\1:')
=> "342:4"
irb(main):044:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\2:')
=> ":4"
irb(main):045:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\1:')
=> "342:4"
irb(main):046:0> "4243".reverse!.gsub!(/(\d{3})(?=\d)/, '\\1,')
=> "342,4"
irb(main):047:0> "prashant".gsub!(/(\w{3})/, '\\1,')
Elastic beantalk
class HelloWorld
def call(env)
[200, {"Content-Type" => "text/plain"}, ["Hello world!"]]
end
end
public def each1 | |
for element in self do | |
yield(element + "sss") | |
end | |
end | |
['Prashant', "Ankur", "Sachin"].each1 do |ele| | |
print ele, '**' | |
end |