{"id":16055617,"url":"https://github.com/theodorton/ruby-string-calculate","last_synced_at":"2026-06-19T10:32:03.104Z","repository":{"id":66167625,"uuid":"2370291","full_name":"theodorton/ruby-string-calculate","owner":"theodorton","description":"Extension of Ruby's String class to calculate simple mathematic expressions","archived":false,"fork":false,"pushed_at":"2015-09-08T05:41:22.000Z","size":141,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T22:46:51.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theodorton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-09-12T09:46:17.000Z","updated_at":"2017-10-03T19:53:58.000Z","dependencies_parsed_at":"2023-02-19T23:30:54.489Z","dependency_job_id":null,"html_url":"https://github.com/theodorton/ruby-string-calculate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theodorton/ruby-string-calculate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fruby-string-calculate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fruby-string-calculate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fruby-string-calculate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fruby-string-calculate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theodorton","download_url":"https://codeload.github.com/theodorton/ruby-string-calculate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theodorton%2Fruby-string-calculate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34528134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-09T02:20:58.534Z","updated_at":"2026-06-19T10:32:03.083Z","avatar_url":"https://github.com/theodorton.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Calculator extension for the Ruby Strings #\n\nAdds a method `calculate` to the Ruby String-class.\n\nThe method can do the following mathematical operations:\n\n*   Addition\n*   Subtraction\n*   Multiplication\n*   Division\n\n### Examples: ###\n\n    \"1 + 2\".calculate   # =\u003e 3\n    \"9 - 2\".calculate   # =\u003e 7\n    \"5 * 2\".calculate   # =\u003e 10\n    \"15 / 3\".calculate  # =\u003e 5\n\n## Advanced expressions ##\n\nIt also handles more advanced expressions with operations done in the following order:\n\n1.  Multiplication\n2.  Division\n3.  Subtraction\n4.  Addition\n\n### Examples: ###\n\n    \"15+35-5*5\".calculate           # =\u003e 25\n    \"5+10/2-8*4\".calculate          # =\u003e -22\n    \"16*12/6+67-12+20/5\".calculate  # =\u003e 91\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorton%2Fruby-string-calculate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodorton%2Fruby-string-calculate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodorton%2Fruby-string-calculate/lists"}