Sha256: ea4e016069163eaf236623cc9dd437fb4f3d22598a21b21fa7efe40a85d03c5d
Contents?: true
Size: 591 Bytes
Versions: 1
Compression:
Stored size: 591 Bytes
Contents
# -*- coding: utf-8 -*- require 'erb' module Arxutils class Arx def initialize( data , fname ) @fname = fname # 以下のものの配列 # :flist # :classname # :classname_downcase # :items # フィールド名, 型, null許容 の配列 # :plural @data = data @@field ||= Struct.new("Field" , :name, :type, :null ) @data[:ary] = @data[:items].map{ |x| @@field.new( *x ) } end def create contents = File.open( @fname ).read erb = ERB.new(contents) erb.result(binding) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
arxutils-0.1.31 | lib/arxutils/arx.rb |