Sha256: d2c874b3c3c6cb8906d1037155861d51041bf81dd0962d624b482597dbe1025f
Contents?: true
Size: 564 Bytes
Versions: 17
Compression:
Stored size: 564 Bytes
Contents
require 'forwardable' module SuperTable class Record < Struct.new(:model) include ViewHelpers extend Forwardable class << self def property(attr_name) def_delegator :model, attr_name end end def helpers @helpers ||= Class.new do include ViewHelpers end.new end private def respond_to_missing?(name, include_private = false) model.respond_to?(name, include_private) end def method_missing(method, *args, &block) model.send(method, *args, &block) end end end
Version data entries
17 entries across 17 versions & 1 rubygems