Sha256: d5adff12d251309e975936ff8ebf1499c1d45fb6bd18506c21d8e31c369addb8

Contents?: true

Size: 607 Bytes

Versions: 15

Compression:

Stored size: 607 Bytes

Contents

class Module

  # Defines an instance method within a class/module.
  #
  # CREDIT: WhyTheLuckyStiff

  def class_def name, &blk
    class_eval { define_method name, &blk }
  end

  # Defines an instance method within a class/module.
  #
  # CREDIT: WhyTheLuckyStiff

  def module_def name, &blk
    module_eval { define_method name, &blk }
  end

  #--
  # TODO: Why are we making these protected,
  # and where should these really go in Facets?
  #++
  protected :attr
  protected :attr_reader
  protected :attr_writer
  protected :attr_accessor
  protected :remove_method
  protected :undef_method

end

Version data entries

15 entries across 14 versions & 2 rubygems

Version Path
facets-glimmer-3.2.0 lib/core/facets/module/module_def.rb
facets-3.1.0 lib/core/facets/module/module_def.rb
facets-3.0.0 lib/core/facets/module/module_def.rb
facets-2.9.3 lib/core/facets/module/module_def.rb
facets-2.9.2 lib/core/facets/module/module_def.rb
facets-2.9.2 src/core/facets/module/module_def.rb
facets-2.9.1 lib/core/facets/module/module_def.rb
facets-2.9.0 lib/core/facets/module/module_def.rb
facets-2.9.0.pre.2 lib/core/facets/module/module_def.rb
facets-2.9.0.pre.1 lib/core/facets/module/module_def.rb
facets-2.8.4 lib/core/facets/module/module_def.rb
facets-2.8.3 lib/core/facets/module/module_def.rb
facets-2.8.2 lib/core/facets/module/module_def.rb
facets-2.8.1 lib/core/facets/module/module_def.rb
facets-2.8.0 lib/core/facets/module/module_def.rb