![](https://img-blog.csdnimg.cn/1a4afda94c47412e8aed53f078c2a676.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Ruby
Ruby语言学习
郑德帅
滴滴
展开
-
Ruby语言与Mysql数据库的交互
Ruby语言与Mysql数据库的交互1 注意事项2 与数据库交互2.1 版本回退1 注意事项截止发博日期,Ruby版本应为:[2.2,2.7),不再此区间的版本暂时无法使用mysql2和数据库交互,或许可尝试用DBI交互2 与数据库交互2.1 版本回退 由于之前使用的版本过高,只能暂时版本回退…安装...原创 2020-12-02 12:42:39 · 302 阅读 · 0 评论 -
Ruby学习笔记-高级教程:方法、类、正则
=begin 1.类 =end# class Box# def initialize(w,h)# #给实例变量赋值# @width,@height = w,h# print "宽,高:",@width,@height# end# end# box = Box.new(w = 100,h = 200)=begin访问器(getter) & 设置器(setter)方法-end# # 定义类# class Box# # 构造函数# def原创 2020-12-02 12:32:00 · 292 阅读 · 0 评论 -
Ruby学习笔记-基础语法
#!/usr/bin/ruby -w# puts "test words!"################Here Document# print <<EOF# 第一种创建here document 的方法。# 多行字符串,类似前端中的 pre?# EOF# print <<"EOF"# 第二种创建here document 的方法。# 多行字符串# EOF###数据类型# # print("a".ord) #小写字母a的字符编原创 2020-12-02 12:29:54 · 382 阅读 · 0 评论 -
Windows下安装 rubyinstaller
这里写目录标题1 下载2 安装:3 测试安装1 下载下载地址:https://rubyinstaller.org/downloads/2 安装:正常安装即可,唯一需要注意的是勾选 Add Ruby executables to your PATH,不然需要自己后期添加环境变量,等待安装成功就行了;3 测试安装终端输入:ruby -v若打印出版本号等信息,如图,说明安装成功...原创 2020-12-02 12:26:02 · 1016 阅读 · 0 评论