Ruby
文章平均质量分 59
lanrion
这个作者很懒,什么都没留下…
展开
-
Ruby 的include和extend用法
Ruby使用include和extend来对class做补充。假设有一个module:module Person def about_me puts "This is about me." endend 1, include <module name> 1.1 使模块的方法变成类的实例方法:class Student in...原创 2013-07-29 11:15:55 · 598 阅读 · 0 评论 -
Ruby中require、load、autoload的区别
require:require(filename) -> true or falseRuby tries to load the library named string, returning true if successful. If the filename does not resolve to an absolute path, it will be searched fo...原创 2013-07-29 21:34:12 · 373 阅读 · 0 评论 -
最近完成的一个项目:essaywit
我的github账号:https://github.com/lanrion我的微博: http://www.weibo.com/denghuaitao 今天结束了一个项目,http://www.essaywit.com 。功能都挺简单,一个购物车,订单,支付,订单服务, 会话管理,三个角色, 导师,学生,管理员,功能简单,但几乎web应用需要的都已经有。 用户管理是用d...2014-01-04 01:07:42 · 153 阅读 · 0 评论 -
使用 Rails 插件快速开发weixin 服务
GEM https://github.com/lanrion/weixin_rails_middlewareEXAMPLE https://github.com/lanrion/weixin_rails_middleware_example 自动验证微信请求。无需拼接XML格式,只需要使用 WeixinMessageHelper 辅助方法,即可快速回复...2014-01-27 17:56:28 · 129 阅读 · 0 评论 -
微信企业号 Ruby gem
对接企业微信应答:https://github.com/lanrion/qy_wechat(对应公众号gem:https://github.com/lanrion/weixin_rails_middleware)安装目前只有Master稳定版本,务必通过:gem 'qy_wechat', git: 'https://github.com/lanrion/qy_wecha...2015-01-02 11:24:58 · 416 阅读 · 0 评论 -
Twitter ratchet twitter_ratchet_rails
Twitter ratchet , 类似于bootstrap,不过专注于mobile,笔者用过在实际项目中,压缩后非常小,十分适合在mobile中使用。查看官方网站: http://goratchet.com/components/同时也快速包装了一个Rails 的gem: 主要依赖于 Ratchet v2.0.1 https://github.com/lanrion/twit...2014-03-13 01:08:18 · 115 阅读 · 0 评论 -
微信Ruby API access_token 验证 weixin_authorize
微信API access_token 验证 weixin_authorize https://github.com/lanrion/weixin_authorizeWeixinAuthorizeInstallationAdd this line to your application's Gemfile:gem 'weixin_authorize'And then exe...2014-03-16 02:56:36 · 267 阅读 · 0 评论 -
Ruby gem for Baidu API
前一个月专门写了一个Ruby版本的百度API( http://developer.baidu.com/dev), 取名 api4baidu,Github地址: https://github.com/lanrion/baiduRubygems: https://rubygems.org/gems/api4baidu 具体用法,在这里引用一下 homepage里的README ...原创 2013-10-27 23:39:46 · 100 阅读 · 0 评论 -
可对元素为Hash型的数组排序的Ruby Gem: sort_collections
sort_collections:https://github.com/lanrion/sort_collections 这个gem的目的是,当我们通过API接收数据的时候(没有使用ActiveRecord),会出现需要对当前数组进行排序,Ruby中已经提供了sort方法,但是该方法,只是对简单的String、Integer等类型排序,如果是Hash呢?我需要针对Hash里的某个key进...原创 2013-10-27 23:47:21 · 129 阅读 · 0 评论