Class: HelpScout::Mailbox
- Defined in:
- lib/help_scout/mailbox.rb
Constant Summary collapse
- BASIC_ATTRIBUTES =
%i[ id name slug email created_at updated_at ].freeze
Instance Attribute Summary collapse
-
#hrefs ⇒ Object
readonly
Returns the value of attribute hrefs.
Instance Method Summary collapse
- #fields ⇒ Object
- #folders ⇒ Object
-
#initialize(params) ⇒ Mailbox
constructor
A new instance of Mailbox.
Methods included from Getable
Methods included from Listable
Methods inherited from Base
Constructor Details
#initialize(params) ⇒ Mailbox
Returns a new instance of Mailbox.
19 20 21 22 23 24 25 26 27 |
# File 'lib/help_scout/mailbox.rb', line 19 def initialize(params) BASIC_ATTRIBUTES.each do |attribute| next unless params[attribute] instance_variable_set("@#{attribute}", params[attribute]) end @hrefs = HelpScout::Util.map_links(params[:_links]) end |
Instance Attribute Details
#hrefs ⇒ Object (readonly)
Returns the value of attribute hrefs.
17 18 19 |
# File 'lib/help_scout/mailbox.rb', line 17 def hrefs @hrefs end |