Class: Pakyow::Reflection::Mirror Private
- Inherits:
-
Object
- Object
- Pakyow::Reflection::Mirror
- Defined in:
- lib/pakyow/reflection/mirror.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Reflects state from an application’s view templates.
Instance Attribute Summary collapse
- #actions ⇒ Object readonly private
- #endpoints ⇒ Object readonly private
- #scopes ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(app) ⇒ Mirror
constructor
private
A new instance of Mirror.
- #scope(name) ⇒ Object private
Constructor Details
#initialize(app) ⇒ Mirror
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.
Returns a new instance of Mirror.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/pakyow/reflection/mirror.rb', line 23 def initialize(app) @app, @scopes, @endpoints, @actions = app, [], [], [] view_paths.each do |view_path| discover_view_scopes(view_path: view_path) end view_paths.each do |view_path| discover_view_path_associations(view_path: view_path) end end |
Instance Attribute Details
#actions ⇒ Object (readonly)
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.
21 22 23 |
# File 'lib/pakyow/reflection/mirror.rb', line 21 def actions @actions end |
#endpoints ⇒ Object (readonly)
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.
21 22 23 |
# File 'lib/pakyow/reflection/mirror.rb', line 21 def endpoints @endpoints end |
#scopes ⇒ Object (readonly)
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.
21 22 23 |
# File 'lib/pakyow/reflection/mirror.rb', line 21 def scopes @scopes end |
Instance Method Details
#scope(name) ⇒ 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.
35 36 37 38 39 |
# File 'lib/pakyow/reflection/mirror.rb', line 35 def scope(name) @scopes.find { |scope| scope.named?(name) } end |