-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
46 lines (29 loc) · 953 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
= classx
Meta Framework extending and flexible attribute like Moose ( perl )
== Synopsis
require 'classx'
class Point
include ClassX
has :x, :kind_of => Fixnum
has :y, :kind_of => Fixnum
end
class Point3D < Point
has :z, :kind_of => Fixnum, :optional => true
end
Point.new(:x => 30, :y => 40) #=> <# Point @x=30, @y=40 >
point3d = Point3D.new(:x => 30, :y => 40, :z => 50) #=> <# Point3D @x=30, @y=40, @z=50 >
point3d.z = 60.0 # raise ClassX::InvalidAttrArgument
== Description
perl's Moose like Class interface.
== Installation
=== Archive Installation
rake install
=== Gem Installation
gem install classx
== Features/Problems
== SEE ALSO
Moose: http://search.cpan.org/~drolsky/Moose-0.57/lib/Moose.pm
== Copyright
Author:: Keiji, Yoshimi <walf443 at gmail.com>
Copyright:: Copyright (c) 2008 Keiji, Yoshimi
License:: you can redistribute it and/or modify it under the same terms as Ruby itself.