Class: Gitloggl::Gitlab::Stack::Abstract
- Inherits:
-
Object
- Object
- Gitloggl::Gitlab::Stack::Abstract
- Defined in:
- lib/gitloggl/gitlab/stack/abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ Abstract
constructor
A new instance of Abstract.
Constructor Details
#initialize(app, options = {}) ⇒ Abstract
Returns a new instance of Abstract.
17 18 19 20 |
# File 'lib/gitloggl/gitlab/stack/abstract.rb', line 17 def initialize(app, = {}) @app = app @options = end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
7 8 9 |
# File 'lib/gitloggl/gitlab/stack/abstract.rb', line 7 def app @app end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
7 8 9 |
# File 'lib/gitloggl/gitlab/stack/abstract.rb', line 7 def env @env end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/gitloggl/gitlab/stack/abstract.rb', line 7 def @options end |
Class Method Details
.opt(*names) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/gitloggl/gitlab/stack/abstract.rb', line 9 def self.opt(*names) names.each do |name| define_method "#{name}!" do .fetch(name) end end end |
Instance Method Details
#call(env) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gitloggl/gitlab/stack/abstract.rb', line 22 def call(env) @env = env before_call around_call do @app.call(env) end after_call end |