Module: Mooncell::Command::ClassMethods Private

Defined in:
lib/mooncell/command.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#expose(*names) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Expose instance variable

Parameters:

  • the (Array<Symbol>)

    variable name to expose

Since:

  • 0.1.0



36
37
38
39
40
41
42
43
44
# File 'lib/mooncell/command.rb', line 36

def expose(*names)
  class_eval do
    names.each do |name|
      attr_reader name unless attr_reader?(name)
    end

    exposures.push(*names)
  end
end

#exposuresObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



48
49
50
# File 'lib/mooncell/command.rb', line 48

def exposures
  @exposures ||= []
end