Class: Makitoo::FeatureFlag::User
- Inherits:
-
Object
- Object
- Makitoo::FeatureFlag::User
- Defined in:
- lib/makitoo/feature_flag/user.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(id, attributes = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(id, attributes = {}) ⇒ User
Returns a new instance of User.
8 9 10 11 |
# File 'lib/makitoo/feature_flag/user.rb', line 8 def initialize(id, attributes = {}) @id = id @attributes = attributes end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/makitoo/feature_flag/user.rb', line 6 def id @id end |
Class Method Details
Instance Method Details
#as_json(options = {}) ⇒ Object
13 14 15 16 17 |
# File 'lib/makitoo/feature_flag/user.rb', line 13 def as_json( = {}) result = @attributes.clone result[:id] = @id result end |