{"id":22981007,"url":"https://github.com/rubyworks/roman","last_synced_at":"2025-04-02T09:42:04.330Z","repository":{"id":1995832,"uuid":"2928825","full_name":"rubyworks/roman","owner":"rubyworks","description":"Roman Numeral Class","archived":false,"fork":false,"pushed_at":"2013-03-09T14:37:12.000Z","size":180,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T17:03:48.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubyworks.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-06T23:09:06.000Z","updated_at":"2013-09-11T22:29:39.000Z","dependencies_parsed_at":"2022-08-27T18:50:59.034Z","dependency_job_id":null,"html_url":"https://github.com/rubyworks/roman","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Froman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Froman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Froman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubyworks%2Froman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubyworks","download_url":"https://codeload.github.com/rubyworks/roman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246793018,"owners_count":20834921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-15T01:46:37.389Z","updated_at":"2025-04-02T09:42:04.304Z","avatar_url":"https://github.com/rubyworks.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roman Numerals\n\n[Website](http://rubyworks.github.com/roman) /\n[Documentation](http://rubydoc.info/gems/roman/frames) /\n[Report Issue](http://github.com/rubyworks/roman/issues) /\n[Source Code](http://github.com/rubyworks/roman) \u0026nbsp; \u0026nbsp;\n[![Flattr Me](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/324911/Rubyworks-Ruby-Development-Fund)\n\n## STATUS\n\n[![Gem Version](https://badge.fury.io/rb/roman.png)](http://badge.fury.io/rb/roman)\n[![Build Status](https://travis-ci.org/rubyworks/roman.png)](https://travis-ci.org/rubyworks/roman)\n\n\n## ABOUT\n\nThe Roman library provides a full-fledged Numeric subclass\nfor working in Roman Numerals.\n\nIn most cases this library is probably overkill. Instead, \n[Ruby Facets](http://rubyworks.github.com/facets) provides Roman numeral\ncore extension methods for the `Integer` and `String` classes which are\nlikely to do everything that one really needs. However, the RomanNumeral\nclass has one advantage. It can be maniputated like any other Numeric\nobject without having to switch back and forth between representations.\nMoreover, and probably most importantly, it makes an excellect example of\nhow to create a Numeric subclass in Ruby.\n\n\n## HOW TO USE\n\nWe can create Roman numerals via the usual instantiation.\n\n    RomanNumeral.new(1)    #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=1\u003e\n\nBut to make it easier the Integer class is extended with #to_roman.\n\n    1.to_roman             #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=1\u003e\n\nRoman numerals can also be formed from their String represnetation.\n\n    RomanNumeral.new('I')  #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=1\u003e\n\n    'I'.to_roman           #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=1\u003e\n\nBecause +RomanNumeral+ is a full-fledged subclass of Numeric,\nwe can work with them like we can an Integer.\n\n     a = 2.to_roman        #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=2\u003e\n     b = 3.to_roman        #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=3\u003e\n     r = a + b             #=\u003e #\u003cRomanNumeral:0x7f10e378ad48 @i=5\u003e\n\nWhen we want to see the actual Romanized figure, we simple\ncall #to_s.\n\n     r.to_s                #=\u003e \"IV\"\n\n\n## HOW TO INSTALL\n\nUsing RubyGems:\n\n    gem install roman\n\n\n## COPYRIGHT \u0026 LICENSE\n\nCopyright (c) 2007 Rubyworks\n\nRoman is destributed under the terms of the \n[BSD-2-Clause](http://spdx.org/license/BSD-2-Clause) license.\n\nPlease see LICENSE.txt file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Froman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyworks%2Froman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyworks%2Froman/lists"}