Class: ReeRoutes::Route
- Inherits:
-
Object
- Object
- ReeRoutes::Route
- Defined in:
- lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#override ⇒ Object
Returns the value of attribute override.
-
#path ⇒ Object
Returns the value of attribute path.
-
#request_method ⇒ Object
Returns the value of attribute request_method.
-
#respond_to ⇒ Object
Returns the value of attribute respond_to.
-
#route ⇒ Object
Returns the value of attribute route.
-
#sections ⇒ Object
Returns the value of attribute sections.
-
#serializer ⇒ Object
Returns the value of attribute serializer.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#visibility ⇒ Object
Returns the value of attribute visibility.
-
#warden_scopes ⇒ Object
Returns the value of attribute warden_scopes.
Instance Method Summary collapse
- #internal? ⇒ Boolean
-
#public? ⇒ Boolean
Routing always includes every route; visibility only affects generated docs.
- #valid? ⇒ Boolean
- #warden_scope ⇒ Object
- #warden_scope=(scope) ⇒ Object
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def action @action end |
#override ⇒ Object
Returns the value of attribute override.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def override @override end |
#path ⇒ Object
Returns the value of attribute path.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def path @path end |
#request_method ⇒ Object
Returns the value of attribute request_method.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def request_method @request_method end |
#respond_to ⇒ Object
Returns the value of attribute respond_to.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def respond_to @respond_to end |
#route ⇒ Object
Returns the value of attribute route.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def route @route end |
#sections ⇒ Object
Returns the value of attribute sections.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def sections @sections end |
#serializer ⇒ Object
Returns the value of attribute serializer.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def serializer @serializer end |
#summary ⇒ Object
Returns the value of attribute summary.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def summary @summary end |
#visibility ⇒ Object
Returns the value of attribute visibility.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def visibility @visibility end |
#warden_scopes ⇒ Object
Returns the value of attribute warden_scopes.
4 5 6 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 4 def warden_scopes @warden_scopes end |
Instance Method Details
#internal? ⇒ Boolean
13 14 15 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 13 def internal? !public? end |
#public? ⇒ Boolean
Routing always includes every route; visibility only affects generated docs.
9 10 11 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 9 def public? visibility.nil? || visibility == :public end |
#valid? ⇒ Boolean
17 18 19 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 17 def valid? !action.nil? && !summary.nil? && !warden_scopes.nil? && !warden_scopes.empty? end |
#warden_scope ⇒ Object
25 26 27 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 25 def warden_scope @warden_scopes&.first end |
#warden_scope=(scope) ⇒ Object
29 30 31 |
# File 'lib/ree_lib/packages/ree_routes/package/ree_routes/route.rb', line 29 def warden_scope=(scope) @warden_scopes = Array(scope) end |