Class: GrubY::Handlers::BaseHandler
- Inherits:
-
Object
- Object
- GrubY::Handlers::BaseHandler
- Defined in:
- lib/gruubY/handlers.rb
Direct Known Subclasses
BusinessConnectionHandler, BusinessMessageHandler, CallbackQueryHandler, ChatBoostHandler, ChatJoinRequestHandler, ChatMemberUpdatedHandler, ChosenInlineResultHandler, ConnectHandler, DeletedBusinessMessagesHandler, DeletedMessagesHandler, DisconnectHandler, EditedBusinessMessageHandler, EditedMessageHandler, ErrorHandler, InlineQueryHandler, ManagedBotUpdatedHandler, MessageHandler, MessageReactionCountHandler, MessageReactionHandler, PollHandler, PreCheckoutQueryHandler, PurchasedPaidMediaHandler, RawUpdateHandler, ShippingQueryHandler, StartHandler, StopHandler, StoryHandler, UserStatusHandler
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#exceptions ⇒ Object
readonly
Returns the value of attribute exceptions.
-
#filters ⇒ Object
readonly
Returns the value of attribute filters.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Instance Method Summary collapse
- #client_only? ⇒ Boolean
- #event ⇒ Object
- #extract(ctx) ⇒ Object
-
#initialize(callback = nil, filters: nil, group: 0, exceptions: nil, &block) ⇒ BaseHandler
constructor
A new instance of BaseHandler.
Constructor Details
#initialize(callback = nil, filters: nil, group: 0, exceptions: nil, &block) ⇒ BaseHandler
Returns a new instance of BaseHandler.
6 7 8 9 10 11 |
# File 'lib/gruubY/handlers.rb', line 6 def initialize(callback = nil, filters: nil, group: 0, exceptions: nil, &block) @callback = callback || block @filters = filters @group = group.to_i @exceptions = exceptions end |
Instance Attribute Details
#callback ⇒ Object (readonly)
Returns the value of attribute callback.
4 5 6 |
# File 'lib/gruubY/handlers.rb', line 4 def callback @callback end |
#exceptions ⇒ Object (readonly)
Returns the value of attribute exceptions.
4 5 6 |
# File 'lib/gruubY/handlers.rb', line 4 def exceptions @exceptions end |
#filters ⇒ Object (readonly)
Returns the value of attribute filters.
4 5 6 |
# File 'lib/gruubY/handlers.rb', line 4 def filters @filters end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
4 5 6 |
# File 'lib/gruubY/handlers.rb', line 4 def group @group end |
Instance Method Details
#client_only? ⇒ Boolean
21 22 23 |
# File 'lib/gruubY/handlers.rb', line 21 def client_only? false end |
#event ⇒ Object
13 14 15 |
# File 'lib/gruubY/handlers.rb', line 13 def event raise NotImplementedError end |
#extract(ctx) ⇒ Object
17 18 19 |
# File 'lib/gruubY/handlers.rb', line 17 def extract(ctx) ctx end |