Class: CodeBuddy::App
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- CodeBuddy::App
- Defined in:
- lib/code_buddy/app.rb
Class Attribute Summary collapse
-
.path_prefix ⇒ Object
Returns the value of attribute path_prefix.
-
.stack ⇒ Object
readonly
Returns the value of attribute stack.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.path_prefix ⇒ Object
Returns the value of attribute path_prefix.
8 9 10 |
# File 'lib/code_buddy/app.rb', line 8 def path_prefix @path_prefix end |
.stack ⇒ Object (readonly)
Returns the value of attribute stack.
7 8 9 |
# File 'lib/code_buddy/app.rb', line 7 def stack @stack end |
Class Method Details
Instance Method Details
#display_stack(selected_param) ⇒ Object
45 46 47 48 49 |
# File 'lib/code_buddy/app.rb', line 45 def display_stack(selected_param) @stack = self.class.stack @stack.selected = selected_param if @stack erb :index end |
#local_request? ⇒ Boolean
55 56 57 |
# File 'lib/code_buddy/app.rb', line 55 def local_request? request.ip == '127.0.0.1' end |
#path_prefix ⇒ Object
51 52 53 |
# File 'lib/code_buddy/app.rb', line 51 def path_prefix self.class.path_prefix end |