Class: ForestAdminDatasourceToolkit::Components::Caller
- Inherits:
-
Object
- Object
- ForestAdminDatasourceToolkit::Components::Caller
- Defined in:
- lib/forest_admin_datasource_toolkit/components/caller.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#permission_level ⇒ Object
readonly
Returns the value of attribute permission_level.
-
#rendering_id ⇒ Object
readonly
Returns the value of attribute rendering_id.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#team ⇒ Object
readonly
Returns the value of attribute team.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Instance Method Summary collapse
-
#initialize(id:, email:, first_name:, last_name:, team:, rendering_id:, tags:, timezone:, permission_level:, role: nil, request: {}, project: nil, environment: nil, **_extra_args) ⇒ Caller
constructor
A new instance of Caller.
- #to_h ⇒ Object
Constructor Details
#initialize(id:, email:, first_name:, last_name:, team:, rendering_id:, tags:, timezone:, permission_level:, role: nil, request: {}, project: nil, environment: nil, **_extra_args) ⇒ Caller
Returns a new instance of Caller.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 6 def initialize( id:, email:, first_name:, last_name:, team:, rendering_id:, tags:, timezone:, permission_level:, role: nil, request: {}, project: nil, environment: nil, **_extra_args ) @id = id @email = email @first_name = first_name @last_name = last_name @team = team @rendering_id = rendering_id @tags = @timezone = timezone @permission_level = @role = role @request = request @project = project @environment = environment end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def first_name @first_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def id @id end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def last_name @last_name end |
#permission_level ⇒ Object (readonly)
Returns the value of attribute permission_level.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def @permission_level end |
#rendering_id ⇒ Object (readonly)
Returns the value of attribute rendering_id.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def rendering_id @rendering_id end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def role @role end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def @tags end |
#team ⇒ Object (readonly)
Returns the value of attribute team.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def team @team end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
4 5 6 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 4 def timezone @timezone end |
Instance Method Details
#to_h ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/forest_admin_datasource_toolkit/components/caller.rb', line 37 def to_h result = {} instance_variables.each do |attribute| result[attribute.to_s.delete('@').to_sym] = instance_variable_get(attribute) end result end |