Sha256: 3504cd7b4b883b4185b8191d84bef35e9a3ded1d90fb63a2d49a6069fb6cfd24
Contents?: true
Size: 539 Bytes
Versions: 13
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true module Ree::BeanDSL def self.included(base) base.extend(ClassMethods) base.include(Ree::Inspectable) end def self.extended(base) base.extend(ClassMethods) end module ClassMethods def bean(name, &proc) dsl = Ree::ObjectDsl.new( Ree.container.packages_facade, name, self, :object ) dsl.instance_exec(&proc) if block_given? dsl.tags(["object"]) dsl.object.set_as_compiled(false) Ree.container.compile(dsl.package, name) end end end
Version data entries
13 entries across 13 versions & 1 rubygems