Shapestruct 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/ShapeStruct.rb +13 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6724cfd212a6f024403c8e4b518e1c11ce846655
|
4
|
+
data.tar.gz: 07fcbae5fc1762428606f58696892fcb63aa7b49
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9cea057e2a3038b315c748b19700fe00edc807e95a0d89bb4e6445c2d90f8be570f5c9e5cbbee3b9574daae8f2accf886ea46c4b0d61f5f6dfd348bc88eef679
|
7
|
+
data.tar.gz: c162bdc10b1b26ac3972aab8457bfea8cd8b0976a771c9911fedf174da48066a7c2e0f7a0d8a7a79bd1e401b8ca48bf6abe33656d44c66578c9edb0bfc81c485
|
data/lib/ShapeStruct.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
def Polygon(*sides)
|
2
|
+
s, s.sides = Polygon.new(sides), Array.new
|
3
|
+
for side in sides; s.sides << side; end
|
4
|
+
return s
|
5
|
+
end
|
6
|
+
def Quad(side1=rand, side2=rand, side3=rand, side4=rand); Quadrilateral.new(side1, side2, side3, side4); end
|
7
|
+
def Rect( l = rand, w = rand ); Rectangle.new(l,w); end
|
8
|
+
def Square(s = rand); Square.new(s); end
|
9
|
+
def Rhombus(arg = Hash.new); Rhombus.new arg; end
|
10
|
+
def Tri(s1=rand, s2=rand, s3=rand, arg = Hash.new); Triangle.new s1, s2, s3, arg; end
|
11
|
+
def Circle(r = rand); Circle.new r; end
|
12
|
+
def Parallel(args = Hash.new(0)); Parallelogram.new(args); end
|
13
|
+
def Pentagon(arg = rand); Pentagon.new arg; end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: Shapestruct
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.9
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Zachary Perlmutter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-19 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: |
|
14
|
+
Constructors for ShapeDoc
|
15
|
+
email: zrp200@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/ShapeStruct.rb
|
21
|
+
homepage:
|
22
|
+
licenses: []
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.3.0
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: Allows you to use shapes in your applications
|
44
|
+
test_files: []
|