New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexa

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexa

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Hexa

Hexa is a gem which provides some objects to work on my math works. There are shapes and objects like circles, squares or cylinders. Each object has its own set of methods like perimeter, volume or area.

There are also extended core objects such as Fixnum. They have new methods to simplify operations such as !, prime? or sqrt.

For the moment, the project isn't very complete. You can contribute if you want!

Installation

If you want to install hexa and start use it:

$ gem install hexa

Now you can use hexa into IRB or a Ruby file:

require "hexa"

Usage

Hexa comes with a set of objects. Objects (Ruby objects) are divided into shapes and objects. Main objects (Ruby) are Circle, Square, Cylinder and Cube. Each constructor accept a Hash of options. Here an example of a IRB session:

>> c = Circle.new :radius => 10
=> #<Circle:0x00000001a00360 @radius=10, @diameter=20>
>> c.diameter
=> 20
>> c.area
=> 314.1592653589793

Other objects (such as Cylinder) allows you to pass other object to set attributes.

>> circle = Circle.new :diameter => 10
=> #<Circle:0x00000001a03b28 @radius=5, @diameter=10>
>> cylinder = Cylinder.new :radius => circle, :height => 40
=> #<Cylinder:0x00000001a0b210 @radius=5, @diameter=10, @height=40>

Contributing

If you want to contribute, just fork the project then write and commit your patch. Finally, you can open a pull-request.

License

Hexa is released under the MIT license. See the LICENSE file for more information.

FAQs

Package last updated on 23 Aug 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc