#ruby
Read more stories on Hashnode
Articles with this tag
我有多年的前端开发经验,目前在朝全栈的路上前进,选择了Ruby on rails作为我的全栈框架。虽然自从去年rails7的到来,hotwire在ralis上可谓是大放异彩。我有想把它收下发挥的写很少的javascript 来完成前端交互渲染的工作。但是由于多年的前端开发,...
In Ruby, a Class can have methods. Similarly, a Module can also have methods. module Hello def name puts "hello bobo" end end However, we...
Ruby blocks allow a section of code to be passed to methods without first storing that section of code into any variable. [1,2,3].each {puts...
While calling the new method, we can pass the value hot. We can also tell Ruby that if no value is passed, then take hot as the default value. class...
In Ruby, we can use attr_reader to give object instances a simpler way to read the class instance variables: class TeaMaker attr_reader :colour,...
Regular expressions can help enforce that particular pattern. If the user’s pattern does not match our format, then using regular expressions, we can...