Class: Bskyrb::AppBskyEmbedRecordwithmedia::View

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#mediaObject

Returns the value of attribute media.



438
439
440
# File 'lib/bskyrb/generated_classes.rb', line 438

def media
  @media
end

#recordObject

Returns the value of attribute record.



436
437
438
# File 'lib/bskyrb/generated_classes.rb', line 436

def record
  @record
end

Class Method Details

.from_hash(hash) ⇒ Object



440
441
442
443
444
445
446
447
448
449
# File 'lib/bskyrb/generated_classes.rb', line 440

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

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

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

  instance
end