Skip to content

Commit

Permalink
convert IAbortFields to module
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahad-10 committed Jul 26, 2024
1 parent 9546157 commit 393c6cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
6 changes: 3 additions & 3 deletions lib/wampproto/message/abort.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
module Wampproto
module Message
# interface for abort fields
class IAbortFields
module IAbortFields
attr_reader :details, :reason, :args, :kwargs
end

# abort fields
class AbortFields < IAbortFields
attr_reader :details, :reason, :args, :kwargs
class AbortFields
include IAbortFields

def initialize(details, reason, *args, **kwargs)
super()
Expand Down
14 changes: 3 additions & 11 deletions sig/wampproto/message/abort.rbs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
module Wampproto
module Message
class IAbortFields
@details: Hash[Symbol, untyped]

@reason: String

@args: Array[untyped]

@kwargs: Hash[Symbol, untyped]

@marshal: Array[untyped]

module IAbortFields
attr_reader details: Hash[Symbol, untyped]

attr_reader reason: String
Expand All @@ -21,6 +11,8 @@ module Wampproto
end

class AbortFields
include IAbortFields

@details: Hash[Symbol, untyped]

@reason: String
Expand Down

0 comments on commit 393c6cc

Please sign in to comment.