Class: Insika::Media::Part

Inherits:
Data
  • Object
show all
Defined in:
lib/insika/media.rb

Overview

A single content part, normalized.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



18
19
20
# File 'lib/insika/media.rb', line 18

def text
  @text
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



18
19
20
# File 'lib/insika/media.rb', line 18

def type
  @type
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



18
19
20
# File 'lib/insika/media.rb', line 18

def url
  @url
end

Instance Method Details

#audio?Boolean

Returns:

  • (Boolean)


19
# File 'lib/insika/media.rb', line 19

def audio? = type == "audio"

#image?Boolean

Returns:

  • (Boolean)


20
# File 'lib/insika/media.rb', line 20

def image? = type == "image"

#text?Boolean

Returns:

  • (Boolean)


21
# File 'lib/insika/media.rb', line 21

def text? = type == "text"