Class: Mobiscroll::Connect::Calendar

Inherits:
Struct
  • Object
show all
Defined in:
lib/mobiscroll/connect/models.rb

Overview

A calendar exposed by one of the supported providers.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def color
  @color
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def description
  @description
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def id
  @id
end

#originalObject

Returns the value of attribute original

Returns:

  • (Object)

    the current value of original



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def original
  @original
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def provider
  @provider
end

#time_zoneObject

Returns the value of attribute time_zone

Returns:

  • (Object)

    the current value of time_zone



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def time_zone
  @time_zone
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



70
71
72
# File 'lib/mobiscroll/connect/models.rb', line 70

def title
  @title
end

Class Method Details

.from_h(hash) ⇒ Object



71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/mobiscroll/connect/models.rb', line 71

def self.from_h(hash)
  return nil if hash.nil?

  new(
    provider: hash['provider'] || hash[:provider],
    id: hash['id'] || hash[:id],
    title: hash['title'] || hash[:title],
    time_zone: hash['timeZone'] || hash[:timeZone] || hash['time_zone'],
    color: hash['color'] || hash[:color],
    description: hash['description'] || hash[:description],
    original: hash['original'] || hash[:original]
  )
end