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



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def color
  @color
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def description
  @description
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def id
  @id
end

#originalObject

Returns the value of attribute original

Returns:

  • (Object)

    the current value of original



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def original
  @original
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def provider
  @provider
end

#time_zoneObject

Returns the value of attribute time_zone

Returns:

  • (Object)

    the current value of time_zone



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def time_zone
  @time_zone
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



98
99
100
# File 'lib/mobiscroll/connect/models.rb', line 98

def title
  @title
end

Class Method Details

.from_h(hash) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/mobiscroll/connect/models.rb', line 99

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