Sha256: 83659abe1af70bf10f73ec8e10a03102bb133e8ef94c470d7ee3259f612235a9
Contents?: true
Size: 420 Bytes
Versions: 26
Compression:
Stored size: 420 Bytes
Contents
#!/usr/bin/env ruby attributes = ARGV[1..(ARGV.size - 1)] template = attributes.map do |attribute| "%<#{attribute}>s" end template = (template * ' ').inspect puts "class #{ARGV[0]}" puts "ATTRIBUTES = #{attributes.inspect}" puts "TEMPLATE = #{template}" attributes.each do |attribute| puts " attr_accessor :#{attribute}" end puts "def to_s" puts "end" puts "def execute" puts "end" puts "end"
Version data entries
26 entries across 26 versions & 1 rubygems