Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
ruby's class extention interface like perl's Moose to write more simply and strict
Ruby
Tag: 0.0.2

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bench
doc
example
lib
spec
tasks
ChangeLog
README
Rakefile

README

= classx

== Synopsis

  require 'classx'
  class Point < ClassX
    has :x, :kind_of => Fixnum
    has :y, :kind_of => Fixnum
  end

  class Point3D < Point
    has :z, :writable => true, :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::InvalidSetterArgumentError

== Description
perl's Moose like Class interface.

== Installation

=== Archive Installation

	rake install

=== Gem Installation

	gem install classx

== Features/Problems

== 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.
Something went wrong with that request. Please try again.