class Makitoo::FeatureFlag::User
Attributes
id[RW]
Public Class Methods
new(id, attributes = {})
click to toggle source
# File lib/makitoo/feature_flag/user.rb, line 8 def initialize(id, attributes = {}) @id = id @attributes = attributes end
of(string_or_user)
click to toggle source
# File lib/makitoo/feature_flag/user.rb, line 19 def self.of(string_or_user) if string_or_user.is_a? String User.new(string_or_user) else string_or_user end end
Public Instance Methods
as_json(options = {})
click to toggle source
# File lib/makitoo/feature_flag/user.rb, line 13 def as_json(options = {}) result = @attributes.clone result[:id] = @id result end