Methods

Included Modules

Naught::NullClassBuilder::Commands::Singleton

Public Class Methods

get(*) click to toggle source
# File lib/naught/null_class_builder/commands/singleton.rb, line 11
def self.get(*)
  instance
end

Public Instance Methods

call() click to toggle source
# File lib/naught/null_class_builder/commands/singleton.rb, line 5
def call
  defer(:class => true) do |subject|
    require 'singleton'
    subject.module_eval do
      include ::Singleton

      def self.get(*)
        instance
      end

      %(dup clone).each do |method_name|
        define_method method_name do
          self
        end
      end
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.