Class: HelpScout::Folder

Inherits:
Base
  • Object
show all
Extended by:
Listable
Defined in:
lib/help_scout/folder.rb

Constant Summary collapse

BASIC_ATTRIBUTES =
%i[
  id
  name
  type
  user_id
  total_count
  active_count
  updated_at
].freeze

Instance Method Summary collapse

Methods included from Listable

list, list_path

Methods inherited from Base

#as_json, #to_h, #to_json

Constructor Details

#initialize(params) ⇒ Folder

Returns a new instance of Folder.



34
35
36
37
38
39
40
# File 'lib/help_scout/folder.rb', line 34

def initialize(params)
  BASIC_ATTRIBUTES.each do |attribute|
    next unless params[attribute]

    instance_variable_set("@#{attribute}", params[attribute])
  end
end