Class: Virtuatable::Controllers::Base

Inherits:
Sinatra::Base
  • Object
show all
Extended by:
Helpers::Declarators
Includes:
API::Errors, API::Responses, Helpers::Accounts, Helpers::Applications, Helpers::Fields, Helpers::Parameters, Helpers::Routes, Helpers::Sessions
Defined in:
lib/virtuatable/controllers/base.rb

Overview

This class represents a base controller for the system, giving access to checking methods for sessions, gateways, applications, etc.

Author:

Instance Attribute Summary

Attributes included from Helpers::Declarators

#api_routes, #routes

Instance Method Summary collapse

Methods included from Helpers::Declarators

add_permissions, add_route, api_route, builder, default_options, push_route

Methods included from Helpers::Parameters

#body_params, #params

Methods included from Helpers::Accounts

#account, #account_id_not_found

Methods included from Helpers::Routes

#current_route

Methods included from Helpers::Fields

#check_either_presence, #check_presence, #field_defined?

Methods included from Helpers::Applications

#application, #application_model

Methods included from Helpers::Sessions

#check_current_route_access, #session, #session_model

Methods included from API::Responses

#api_created, #api_empty, #api_item, #api_list, #api_ok

Methods included from API::Errors

#api_bad_request, #api_error, #api_forbidden, #api_not_found

Instance Method Details

#serviceObject



33
34
35
# File 'lib/virtuatable/controllers/base.rb', line 33

def service
  Virtuatable::Application.instance.builder.service
end