Class: AruxApp::API::Nav
- Inherits:
-
Object
- Object
- AruxApp::API::Nav
- Defined in:
- lib/arux_app/api/nav.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
Returns the value of attribute auth.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Nav
constructor
A new instance of Nav.
- #javascript ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Nav
Returns a new instance of Nav.
7 8 9 10 11 12 |
# File 'lib/arux_app/api/nav.rb', line 7 def initialize( = {}) self.auth = [:auth] raise API::InitializerError.new(:auth, "can't be blank") if self.auth.nil? raise API::InitializerError.new(:auth, "must be of class type AruxApp::API::Auth") if !self.auth.is_a?(AruxApp::API::Auth) end |
Instance Attribute Details
#auth ⇒ Object
Returns the value of attribute auth.
5 6 7 |
# File 'lib/arux_app/api/nav.rb', line 5 def auth @auth end |
Instance Method Details
#javascript ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/arux_app/api/nav.rb', line 14 def javascript = { district: self.auth.district_subdomain, login: { current_uuid: self.auth.current_user_uuid, client_id: self.auth.client_id, redirect_uri: self.auth.redirect_uri, callback: self.auth.js_callback } } return %(new SwitchBoardIONav(#{.to_json});) end |