Class: UI::QuickReplies
- Inherits:
-
Object
- Object
- UI::QuickReplies
- Defined in:
- lib/ui/quick_replies.rb
Overview
Class Method Summary collapse
Class Method Details
.build(*replies) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/ui/quick_replies.rb', line 4 def self.build(*replies) replies.map do |reply| case reply when Hash then build_from_hash(reply) when Array then build_from_array(reply) when String then build_from_string(reply) else raise ArgumentError, 'Arguments should be hashes or arrays of two' end end end |
.location ⇒ Object
16 17 18 |
# File 'lib/ui/quick_replies.rb', line 16 def self.location [{ content_type: 'location' }] end |