1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actioncable/test/stubs/user.rb

16 lines
193 B
Ruby
Raw Normal View History

2015-07-12 11:07:31 -04:00
class User
attr_reader :name
def initialize(name)
@name = name
end
2015-07-12 14:36:42 -04:00
def to_global_id
2015-11-05 18:28:58 -05:00
GlobalID.new("User##{name}")
2015-07-12 14:36:42 -04:00
end
def to_gid_param
to_global_id.to_param
end
2015-07-12 11:07:31 -04:00
end