Class: PostProxy::Queue

Inherits:
Model
  • Object
show all
Defined in:
lib/postproxy/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#to_h

Constructor Details

#initialize(**attrs) ⇒ Queue

Returns a new instance of Queue.



132
133
134
135
136
137
138
139
140
# File 'lib/postproxy/types.rb', line 132

def initialize(**attrs)
  @description = nil
  @timeslots = []
  @posts_count = 0
  super
  @timeslots = (@timeslots || []).map do |t|
    t.is_a?(Timeslot) ? t : Timeslot.new(**t.transform_keys(&:to_sym))
  end
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def description
  @description
end

#enabledObject

Returns the value of attribute enabled.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def enabled
  @enabled
end

#idObject

Returns the value of attribute id.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def id
  @id
end

#jitterObject

Returns the value of attribute jitter.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def jitter
  @jitter
end

#nameObject

Returns the value of attribute name.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def name
  @name
end

#posts_countObject

Returns the value of attribute posts_count.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def posts_count
  @posts_count
end

#profile_group_idObject

Returns the value of attribute profile_group_id.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def profile_group_id
  @profile_group_id
end

#timeslotsObject

Returns the value of attribute timeslots.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def timeslots
  @timeslots
end

#timezoneObject

Returns the value of attribute timezone.



129
130
131
# File 'lib/postproxy/types.rb', line 129

def timezone
  @timezone
end