Class: Tinysky::ExternalEmbed
- Inherits:
-
Object
- Object
- Tinysky::ExternalEmbed
- Defined in:
- lib/tinysky/external_embed.rb
Instance Method Summary collapse
-
#initialize(attrs) ⇒ ExternalEmbed
constructor
A new instance of ExternalEmbed.
- #to_hash ⇒ Object
Constructor Details
#initialize(attrs) ⇒ ExternalEmbed
Returns a new instance of ExternalEmbed.
3 4 5 6 7 8 |
# File 'lib/tinysky/external_embed.rb', line 3 def initialize(attrs) @description = attrs[:description] @thumb = attrs[:thumb] @title = attrs[:title] @uri = attrs[:uri] end |
Instance Method Details
#to_hash ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/tinysky/external_embed.rb', line 10 def to_hash { "$type" => Tinysky::Lexicon::EXTERNAL_EMBED, "external" => { "description" => @description, "thumb" => @thumb, "title" => @title, "uri" => @uri } } end |