没有合适的资源?快使用搜索试试~ 我知道了~
einstein-enum:受 Swift 启发的具有关联值和多态行为的枚举
共10个文件
rb:5个
gemspec:1个
rakefile:1个
需积分: 9 0 下载量 84 浏览量
2021-06-18
20:23:16
上传
评论
收藏 6KB ZIP 举报
温馨提示
爱因斯坦枚举 这是 Swift 的 Enum 类型的一个端口。 在 Swift 中,枚举具有各种强大的功能,例如关联值和原始值。 天才。 它们真的很棒,不像泛型、可怕的编译错误消息和相当迂腐的init方法要求。 兼容性 我写这个是为了在 RubyMotion 中使用,但我写它的方式是它与所有 Ruby 实现兼容(我知道!)。 用法 class Api < Enum value :Status value :Posts , raw_value : :posts # these represent an endpoint for "user detail", either by id or username value :User , Fixnum value :User , String def url # inside this method, the
资源推荐
资源详情
资源评论
收起资源包目录
einstein-enum-master.zip (10个子文件)
einstein-enum-master
lib
enum.rb 4KB
einstein-enum.rb 207B
version.rb 44B
Gemfile 53B
spec
spec_helper.rb 0B
einstein_enum_spec.rb 4KB
Rakefile 65B
README.md 2KB
Gemfile.lock 489B
einstein-enum.gemspec 851B
共 10 条
- 1
资源评论
moseswangbp981
- 粉丝: 26
- 资源: 4639
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功