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
|
$ kwalify -a genclass-ruby -P -f BABEL.schema.yaml \
--hashlike --initialize=false --module=Babel
require 'kwalify/util/hashlike'
module Babel
##
class Team
include Kwalify::Util::HashLike
attr_accessor :name # str
attr_accessor :desc # str
attr_accessor :chief # map
attr_accessor :members # seq
end
##
class Member
include Kwalify::Util::HashLike
attr_accessor :name # str
attr_accessor :desc # str
attr_accessor :team # map
end
end
$ kwalify -a genclass-ruby -P -f BABEL.schema.yaml \
--hashlike --initialize=false --module=Babel > models.rb
|