Class: Bskyrb::AppBskyFeedDefs::ViewerState

Inherits:
Object
  • Object
show all
Defined in:
lib/bskyrb/generated_classes.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#likeObject

Returns the value of attribute like.



512
513
514
# File 'lib/bskyrb/generated_classes.rb', line 512

def like
  @like
end

#repostObject

Returns the value of attribute repost.



510
511
512
# File 'lib/bskyrb/generated_classes.rb', line 510

def repost
  @repost
end

Class Method Details

.from_hash(hash) ⇒ Object



514
515
516
517
518
519
520
521
522
523
# File 'lib/bskyrb/generated_classes.rb', line 514

def self.from_hash(hash)
  # httparty-returned string-keyed hash
  instance = new

  instance.send(:repost=, hash["repost"])

  instance.send(:like=, hash["like"])

  instance
end