Class: MessageQuickly::Messaging::WebUrlButton

Inherits:
Button
  • Object
show all
Defined in:
lib/message_quickly/messaging/web_url_button.rb

Instance Attribute Summary collapse

Attributes inherited from Button

#title, #type

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ WebUrlButton

Returns a new instance of WebUrlButton.



7
8
9
10
# File 'lib/message_quickly/messaging/web_url_button.rb', line 7

def initialize(params = {})
  params['type'] ||= 'web_url'
  super(params)
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



5
6
7
# File 'lib/message_quickly/messaging/web_url_button.rb', line 5

def url
  @url
end

Instance Method Details

#to_hashObject



12
13
14
# File 'lib/message_quickly/messaging/web_url_button.rb', line 12

def to_hash
  { type: type, url: url, title: title }
end