Class: Browserbeam::MediaItem

Inherits:
Struct
  • Object
show all
Defined in:
lib/browserbeam/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



63
64
65
# File 'lib/browserbeam/types.rb', line 63

def data
  @data
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



63
64
65
# File 'lib/browserbeam/types.rb', line 63

def format
  @format
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



63
64
65
# File 'lib/browserbeam/types.rb', line 63

def type
  @type
end

Class Method Details

.from_hash(data) ⇒ Object



64
65
66
# File 'lib/browserbeam/types.rb', line 64

def self.from_hash(data)
  new(type: data["type"] || "", format: data["format"] || "", data: data["data"] || "")
end