Class: Hackle::User
- Inherits:
-
Object
- Object
- Hackle::User
- Defined in:
- lib/hackle/models/user.rb
Instance Attribute Summary collapse
- #id ⇒ String readonly
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Instance Method Summary collapse
-
#initialize(id:, properties:) ⇒ User
constructor
A new instance of User.
- #valid? ⇒ Boolean
Constructor Details
#initialize(id:, properties:) ⇒ User
Returns a new instance of User.
15 16 17 18 |
# File 'lib/hackle/models/user.rb', line 15 def initialize(id:, properties:) @id = id @properties = properties end |
Instance Attribute Details
#id ⇒ String (readonly)
9 10 11 |
# File 'lib/hackle/models/user.rb', line 9 def id @id end |
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
9 |
# File 'lib/hackle/models/user.rb', line 9 attr_reader :id, :properties |
Instance Method Details
#valid? ⇒ Boolean
20 21 22 |
# File 'lib/hackle/models/user.rb', line 20 def valid? !id.nil? && id.is_a?(String) end |