Class: Rap::Declarations::Context
- Inherits:
-
Object
- Object
- Rap::Declarations::Context
- Defined in:
- lib/rap/declarations/context.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
The declarations App.
-
#desc ⇒ Object
Tracks the current description, which will be used to document the next task declaration.
-
#namespace ⇒ Object
The base constant for all task declarations, prepended to the task name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(app = Tap::App.instance) ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize(app = Tap::App.instance) ⇒ Context
Returns a new instance of Context.
22 23 24 25 26 27 |
# File 'lib/rap/declarations/context.rb', line 22 def initialize(app=Tap::App.instance) app.env ||= Tap::Env.new @app = app @namespace = "" @desc = nil end |
Instance Attribute Details
#app ⇒ Object
The declarations App
13 14 15 |
# File 'lib/rap/declarations/context.rb', line 13 def app @app end |
#desc ⇒ Object
Tracks the current description, which will be used to document the next task declaration.
20 21 22 |
# File 'lib/rap/declarations/context.rb', line 20 def desc @desc end |
#namespace ⇒ Object
The base constant for all task declarations, prepended to the task name.
16 17 18 |
# File 'lib/rap/declarations/context.rb', line 16 def namespace @namespace end |
Class Method Details
.instance ⇒ Object
7 8 9 |
# File 'lib/rap/declarations/context.rb', line 7 def instance @instance ||= new end |