Class: YourImageShare::ListedUpload

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

Overview

One row of a #list result.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def created_at
  @created_at
end

#directObject

Returns the value of attribute direct

Returns:

  • (Object)

    the current value of direct



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def direct
  @direct
end

#expires_atObject

Returns the value of attribute expires_at

Returns:

  • (Object)

    the current value of expires_at



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def expires_at
  @expires_at
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def id
  @id
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def path
  @path
end

#srcObject

Returns the value of attribute src

Returns:

  • (Object)

    the current value of src



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def src
  @src
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def title
  @title
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



12
13
14
# File 'lib/yourimageshare/types.rb', line 12

def type
  @type
end

Class Method Details

.from_json(h) ⇒ Object



13
14
15
16
17
# File 'lib/yourimageshare/types.rb', line 13

def self.from_json(h)
  new(id: h["id"], type: h["type"], title: h["title"], path: h["path"],
      src: h["src"], direct: h["direct"], expires_at: h["expires_at"],
      created_at: h["created_at"])
end