用于计算和转换测量值的简单 Ruby gem_Ruby_代码_相关文件_下载

上传者: 38334677 | 上传时间: 2022-07-12 09:07:56 | 文件大小: 31KB | 文件类型: ZIP
ruby-measurement是一个简单的 Ruby gem,用于计算和转换测量单位。 安装 将此行添加到应用程序的 Gemfile: gem 'ruby-measurement' 然后执行: $ bundle 或者自己安装: $ gem install ruby-measurement 用法 该类Measurement负责解析字符串以确定输入的数量和计量单位。这可以通过 parse返回一个Measurement对象的方法来完成。 Measurement.parse('3 feet') # => 3.0 ft. Measurement.parse('25 fl oz') # => 25.0 fl. oz. Measurement.parse('12 tonnes') # => 12.0 t Measurement.parse('25 "') # => 25.0 in. 度量包括数量和单位。 更多详情、使用方法,请下载后阅读README.md文件

文件下载

资源详情

[{"title":"( 48 个子文件 31KB ) 用于计算和转换测量值的简单 Ruby gem_Ruby_代码_相关文件_下载\n\n","children":[{"title":"ruby-measurement-master","children":[{"title":"ruby-measurement.gemspec <span style='color:#111;'> 930B </span>","children":null,"spread":false},{"title":"tasks","children":[{"title":"debug.rake <span style='color:#111;'> 127B </span>","children":null,"spread":false},{"title":"rspec.rake <span style='color:#111;'> 135B </span>","children":null,"spread":false}],"spread":true},{"title":"Rakefile <span style='color:#111;'> 132B </span>","children":null,"spread":false},{"title":".github","children":[{"title":"workflows","children":[{"title":"CI.yml <span style='color:#111;'> 557B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Gemfile <span style='color:#111;'> 96B </span>","children":null,"spread":false},{"title":"spec","children":[{"title":"ruby-measurement","children":[{"title":"unit_spec.rb <span style='color:#111;'> 4.21KB </span>","children":null,"spread":false},{"title":"core_ext","children":[{"title":"string_spec.rb <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"symbol_spec.rb <span style='color:#111;'> 396B </span>","children":null,"spread":false},{"title":"numeric_spec.rb <span style='color:#111;'> 183B </span>","children":null,"spread":false}],"spread":true},{"title":"measurement_spec.rb <span style='color:#111;'> 12.21KB </span>","children":null,"spread":false},{"title":"definitions","children":[{"title":"metric","children":[{"title":"capacity_spec.rb <span style='color:#111;'> 996B </span>","children":null,"spread":false},{"title":"weight_spec.rb <span style='color:#111;'> 7.88KB </span>","children":null,"spread":false},{"title":"length_spec.rb <span style='color:#111;'> 6.39KB </span>","children":null,"spread":false},{"title":"volume_spec.rb <span style='color:#111;'> 6.39KB </span>","children":null,"spread":false},{"title":"area_spec.rb <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false}],"spread":true},{"title":"us_customary","children":[{"title":"capacity_spec.rb <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"weight_spec.rb <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"length_spec.rb <span style='color:#111;'> 6.04KB </span>","children":null,"spread":false},{"title":"volume_spec.rb <span style='color:#111;'> 4.67KB </span>","children":null,"spread":false},{"title":"area_spec.rb <span style='color:#111;'> 3.77KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"unit_builder_spec.rb <span style='color:#111;'> 2.71KB </span>","children":null,"spread":false}],"spread":true},{"title":"spec_helper.rb <span style='color:#111;'> 86B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 160B </span>","children":null,"spread":false},{"title":"CHANGELOG.md <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"ruby-measurement.rb <span style='color:#111;'> 149B </span>","children":null,"spread":false},{"title":"ruby-measurement","children":[{"title":"measurement.rb <span style='color:#111;'> 4.52KB </span>","children":null,"spread":false},{"title":"core_ext.rb <span style='color:#111;'> 130B </span>","children":null,"spread":false},{"title":"core_ext","children":[{"title":"numeric.rb <span style='color:#111;'> 111B </span>","children":null,"spread":false},{"title":"symbol.rb <span style='color:#111;'> 148B </span>","children":null,"spread":false},{"title":"string.rb <span style='color:#111;'> 211B </span>","children":null,"spread":false}],"spread":false},{"title":"unit.rb <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"definitions.rb <span style='color:#111;'> 98B </span>","children":null,"spread":false},{"title":"version.rb <span style='color:#111;'> 42B </span>","children":null,"spread":false},{"title":"definitions","children":[{"title":"metric.rb <span style='color:#111;'> 265B </span>","children":null,"spread":false},{"title":"metric","children":[{"title":"area.rb <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"volume.rb <span style='color:#111;'> 3.38KB </span>","children":null,"spread":false},{"title":"length.rb <span style='color:#111;'> 3.39KB </span>","children":null,"spread":false},{"title":"capacity.rb <span style='color:#111;'> 696B </span>","children":null,"spread":false},{"title":"weight.rb <span style='color:#111;'> 4.33KB </span>","children":null,"spread":false}],"spread":false},{"title":"us_customary","children":[{"title":"area.rb <span style='color:#111;'> 2.25KB </span>","children":null,"spread":false},{"title":"volume.rb <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"length.rb <span style='color:#111;'> 3.35KB </span>","children":null,"spread":false},{"title":"capacity.rb <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"weight.rb <span style='color:#111;'> 1.95KB </span>","children":null,"spread":false}],"spread":false},{"title":"us_customary.rb <span style='color:#111;'> 295B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 6.29KB </span>","children":null,"spread":false},{"title":"LICENSE.txt <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明