Sha256: eac1b686e5e997c0df02d30b2b7d7fce7ce8b743d44b780cbfca6fdc93002840

Contents?: true

Size: 695 Bytes

Versions: 9

Compression:

Stored size: 695 Bytes

Contents

# Slappy Examples
#
# # called when start up
# hello do
#   puts 'successfly connected'
# end
#
#
# # called when match message
# hear 'foo' do
#   puts 'foo'
# end
#
#
# # use regexp in string literal
# hear 'bar (.*)' do |event|
#   puts event.matches[1] #=> Event#matches return MatchData object
# end
#
#
# # event object is slack event JSON (convert to Hashie::Mash)
# hear '^bar (.*)' do |event|
#   puts event.channel #=> channel id
#   say 'slappy!', channel: event.channel #=> to received message channel
#   say 'slappy!', channel: '#general'
#   say 'slappy!', username: 'slappy!', icon_emoji: ':slappy:'
# end
#
#
# # use regexp literal
# hear /^foobar/ do
#   say 'slappppy!'
# end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
slappy-0.6.3 templates/example.rb
slappy-0.6.2 templates/example.rb
slappy-0.6.1 templates/example.rb
slappy-0.6.0 templates/example.rb
slappy-0.5.2 templates/example.rb
slappy-0.5.1 templates/example.rb
slappy-0.5.0 templates/example.rb
slappy-0.4.0 templates/example.rb
slappy-0.3.0 templates/example.rb