Class: DynamicPDFApi::UrlAction
- Defined in:
- lib/ruby_client/UrlAction.rb
Overview
Represents an action linking to an external URL.
Instance Attribute Summary collapse
-
#url ⇒ Object
Gets or sets the URL launched by the action.
Instance Method Summary collapse
-
#initialize(url) ⇒ UrlAction
constructor
Initializes a new instance of the UrlAction class.
- #to_json(_options = {}) ⇒ Object
Constructor Details
#initialize(url) ⇒ UrlAction
Initializes a new instance of the UrlAction class.
13 14 15 16 |
# File 'lib/ruby_client/UrlAction.rb', line 13 def initialize(url) super() @url = url end |
Instance Attribute Details
#url ⇒ Object
Gets or sets the URL launched by the action.
21 22 23 |
# File 'lib/ruby_client/UrlAction.rb', line 21 def url @url end |
Instance Method Details
#to_json(_options = {}) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ruby_client/UrlAction.rb', line 23 def to_json( = {}) json_array = {} json_array['url'] = @url unless @url.nil? JSON.pretty_generate(json_array) end |