Class: TableauTrustedInterface::Report
- Inherits:
-
Object
- Object
- TableauTrustedInterface::Report
- Defined in:
- lib/tableau_trusted_interface/report.rb
Instance Attribute Summary collapse
-
#embed_params ⇒ Object
Returns the value of attribute embed_params.
-
#path ⇒ Object
Returns the value of attribute path.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
-
#ticket ⇒ Object
readonly
Returns the value of attribute ticket.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Report
constructor
A new instance of Report.
- #report_embed_url ⇒ Object
- #report_url ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Report
Returns a new instance of Report.
9 10 11 12 13 14 15 16 17 |
# File 'lib/tableau_trusted_interface/report.rb', line 9 def initialize( = {}) @path = .fetch(:path, nil) = (.fetch(:embed_params, [])) @user = .fetch(:user, TableauTrustedInterface.config.default_tableau_user) @server = .fetch(:server, TableauTrustedInterface.config.default_tableau_server) @ticket = generate_ticket raise TicketDenied, 'Check Tableau IP white-listing or user access' if @ticket == '-1' end |
Instance Attribute Details
#embed_params ⇒ Object
Returns the value of attribute embed_params.
7 8 9 |
# File 'lib/tableau_trusted_interface/report.rb', line 7 def end |
#path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/tableau_trusted_interface/report.rb', line 7 def path @path end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
6 7 8 |
# File 'lib/tableau_trusted_interface/report.rb', line 6 def server @server end |
#ticket ⇒ Object (readonly)
Returns the value of attribute ticket.
6 7 8 |
# File 'lib/tableau_trusted_interface/report.rb', line 6 def ticket @ticket end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'lib/tableau_trusted_interface/report.rb', line 6 def user @user end |
Instance Method Details
#report_embed_url ⇒ Object
23 24 25 |
# File 'lib/tableau_trusted_interface/report.rb', line 23 def report.(query: ).to_s end |
#report_url ⇒ Object
19 20 21 |
# File 'lib/tableau_trusted_interface/report.rb', line 19 def report_url report.(query: nil).to_s end |