Class: PostProxy::ProfileComment

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) ⇒ ProfileComment

Returns a new instance of ProfileComment.



485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/postproxy/types.rb', line 485

def initialize(**attrs)
  @parent_external_id = nil
  @author_username = nil
  @author_avatar_url = nil
  @platform_data = nil
  @replies = []
  super
  @posted_at = parse_time(@posted_at)
  @created_at = parse_time(@created_at)
  @replies = (@replies || []).map do |r|
    r.is_a?(ProfileComment) ? r : ProfileComment.new(**r.transform_keys(&:to_sym))
  end
end

Instance Attribute Details

#author_avatar_urlObject

Returns the value of attribute author_avatar_url.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def author_avatar_url
  @author_avatar_url
end

#author_usernameObject

Returns the value of attribute author_username.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def author_username
  @author_username
end

#bodyObject

Returns the value of attribute body.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def body
  @body
end

#created_atObject

Returns the value of attribute created_at.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def created_at
  @created_at
end

#external_idObject

Returns the value of attribute external_id.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def external_id
  @external_id
end

#idObject

Returns the value of attribute id.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def id
  @id
end

#parent_external_idObject

Returns the value of attribute parent_external_id.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def parent_external_id
  @parent_external_id
end

#placement_idObject

Returns the value of attribute placement_id.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def placement_id
  @placement_id
end

#platform_dataObject

Returns the value of attribute platform_data.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def platform_data
  @platform_data
end

#posted_atObject

Returns the value of attribute posted_at.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def posted_at
  @posted_at
end

#repliesObject

Returns the value of attribute replies.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def replies
  @replies
end

#statusObject

Returns the value of attribute status.



481
482
483
# File 'lib/postproxy/types.rb', line 481

def status
  @status
end