Class: GmailMarkup::Generators::ViewAction
- Inherits:
-
Object
- Object
- GmailMarkup::Generators::ViewAction
- Defined in:
- lib/gmail_markup/generators/view_action.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#target_url ⇒ Object
readonly
Returns the value of attribute target_url.
Instance Method Summary collapse
-
#initialize(name:, target_url:) ⇒ ViewAction
constructor
A new instance of ViewAction.
- #to_json ⇒ Object
Constructor Details
#initialize(name:, target_url:) ⇒ ViewAction
Returns a new instance of ViewAction.
9 10 11 12 |
# File 'lib/gmail_markup/generators/view_action.rb', line 9 def initialize(name:, target_url:) @name = name @target_url = target_url end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/gmail_markup/generators/view_action.rb', line 7 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/gmail_markup/generators/view_action.rb', line 7 def name @name end |
#target_url ⇒ Object (readonly)
Returns the value of attribute target_url.
7 8 9 |
# File 'lib/gmail_markup/generators/view_action.rb', line 7 def target_url @target_url end |
Instance Method Details
#to_json ⇒ Object
14 15 16 |
# File 'lib/gmail_markup/generators/view_action.rb', line 14 def to_json JSON.pretty_generate(markup_data).html_safe end |