Class: FamilyappSdk::Components::Button
- Inherits:
-
Object
- Object
- FamilyappSdk::Components::Button
- Defined in:
- lib/familyapp_sdk/components/button.rb
Instance Attribute Summary collapse
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#web_url ⇒ Object
Returns the value of attribute web_url.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(type:, title:, payload: nil, web_url: nil) ⇒ Button
constructor
A new instance of Button.
Constructor Details
#initialize(type:, title:, payload: nil, web_url: nil) ⇒ Button
Returns a new instance of Button.
6 7 8 9 10 11 |
# File 'lib/familyapp_sdk/components/button.rb', line 6 def initialize(type:, title:, payload: nil, web_url: nil) @button_type = type @title = title @payload = payload @web_url = web_url end |
Instance Attribute Details
#payload ⇒ Object
Returns the value of attribute payload.
4 5 6 |
# File 'lib/familyapp_sdk/components/button.rb', line 4 def payload @payload end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/familyapp_sdk/components/button.rb', line 4 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/familyapp_sdk/components/button.rb', line 4 def type @type end |
#web_url ⇒ Object
Returns the value of attribute web_url.
4 5 6 |
# File 'lib/familyapp_sdk/components/button.rb', line 4 def web_url @web_url end |
Instance Method Details
#build ⇒ Object
13 14 15 |
# File 'lib/familyapp_sdk/components/button.rb', line 13 def build instance_values.delete_if { |_attribute, value| value.nil? } end |