Sha256: a0227f322ebc459b554ba0805d230e212346d66317cd23b1999b477ae9de0c0a
Contents?: true
Size: 355 Bytes
Versions: 3
Compression:
Stored size: 355 Bytes
Contents
require 'hashie' require 'forwardable' module Slappy class Event extend Forwardable attr_reader :matches def_delegators :@data, :method_missing, :respond_to_missing? def initialize(data, pattern) @data = Hashie::Mash.new data @matches = text.match pattern end def text @data['text'].to_s end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
slappy-0.2.0 | lib/slappy/event.rb |
slappy-0.1.1 | lib/slappy/event.rb |
slappy-0.1.0 | lib/slappy/event.rb |