Class: SweetLoader::Scope

Inherits:
Object
  • Object
show all
Includes:
SweetLoader
Defined in:
lib/sweetloader/scope.rb

Instance Attribute Summary collapse

Attributes included from ClassMethods

#default_mode

Instance Method Summary collapse

Methods included from SweetLoader

#autoload_modules, #autoload_scope, #include_and_extend, #mode_logic

Methods included from ClassMethods

#mode, #mode=, #namespaces, #namespaces=, #root, #root=, #translate, #valid_mode?, #valid_modes

Constructor Details

#initialize(the_module, options = {}) ⇒ Scope

Returns a new instance of Scope.



7
8
9
10
# File 'lib/sweetloader/scope.rb', line 7

def initialize the_module, options = {}
  @the_module = the_module
  @autoload_options = options
end

Instance Attribute Details

#autoload_optionsObject (readonly)

Returns the value of attribute autoload_options.



5
6
7
# File 'lib/sweetloader/scope.rb', line 5

def autoload_options
  @autoload_options
end

#the_moduleObject (readonly)

Returns the value of attribute the_module.



5
6
7
# File 'lib/sweetloader/scope.rb', line 5

def the_module
  @the_module
end

Instance Method Details

#nameObject



12
13
14
# File 'lib/sweetloader/scope.rb', line 12

def name
  the_module.name
end