Class: Prependers::Annotate::Namespace
- Inherits:
-
Module
- Object
- Module
- Prependers::Annotate::Namespace
- Defined in:
- lib/prependers/annotate/namespace.rb
Instance Attribute Summary collapse
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Class Method Summary collapse
Instance Method Summary collapse
- #included(base) ⇒ Object
-
#initialize(namespace) ⇒ Namespace
constructor
A new instance of Namespace.
Constructor Details
#initialize(namespace) ⇒ Namespace
Returns a new instance of Namespace.
12 13 14 |
# File 'lib/prependers/annotate/namespace.rb', line 12 def initialize(namespace) @namespace = namespace end |
Instance Attribute Details
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
6 7 8 |
# File 'lib/prependers/annotate/namespace.rb', line 6 def namespace @namespace end |
Class Method Details
.[](namespace) ⇒ Object
8 9 10 |
# File 'lib/prependers/annotate/namespace.rb', line 8 def self.[](namespace) new(namespace) end |
Instance Method Details
#included(base) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/prependers/annotate/namespace.rb', line 16 def included(base) base.singleton_class.class_eval <<~RUBY, __FILE__, __LINE__ + 1 def __prependers_namespace__ #{@namespace} end RUBY end |