Class: ScalarGalaxy::Models::User

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/galaxy-ruby/models/user.rb,
sig/galaxy-ruby/models/user.rbs

Overview

See Also:

  • ScalarGalaxy::Resources::Authentication#create_user

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: nil, name: nil) ⇒ User

A user

Parameters:

  • id (Integer) (defaults to: nil)
  • name (String) (defaults to: nil)
  • id: (Integer) (defaults to: nil)
  • name: (String) (defaults to: nil)


# File 'lib/galaxy-ruby/models/user.rb', line 19

Instance Attribute Details

#idInteger? (readonly)

Returns the value of attribute id.

Returns:

  • (Integer, nil)


6
7
8
# File 'sig/galaxy-ruby/models/user.rbs', line 6

def id
  @id
end

#nameString?

Parameters:

  • (String)

Returns:

  • (String, nil)


10
# File 'lib/galaxy-ruby/models/user.rb', line 10

optional :name, String

Instance Method Details

#id=Integer (readonly)

Parameters:

  • (Integer)

Returns:

  • (Integer)


8
# File 'sig/galaxy-ruby/models/user.rbs', line 8

def id=: (Integer) -> Integer

#to_hash{ id: Integer, name: String }

Returns:

  • ({ id: Integer, name: String })


16
# File 'sig/galaxy-ruby/models/user.rbs', line 16

def to_hash: -> { id: Integer, name: String }