Class: Pakyow::Reflection::Mirror Private

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#actionsObject (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

#endpointsObject (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

#scopesObject (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