Class: SyoboiCalendar::Resources::ChannelGroupResource

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/syoboi_calendar/resources/channel_group_resource.rb

Instance Attribute Summary

Attributes inherited from BaseResource

#source

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize, #updated_at

Constructor Details

This class inherits a constructor from SyoboiCalendar::Resources::BaseResource

Instance Method Details

#commentString?

Returns:

  • (String, nil)


5
6
7
# File 'lib/syoboi_calendar/resources/channel_group_resource.rb', line 5

def comment
  source["ChGroupComment"]
end

#idInteger?

Returns:

  • (Integer, nil)


10
11
12
13
14
# File 'lib/syoboi_calendar/resources/channel_group_resource.rb', line 10

def id
  if source["ChGID"]
    source["ChGID"].to_i
  end
end

#nameString?

Returns:

  • (String, nil)


17
18
19
# File 'lib/syoboi_calendar/resources/channel_group_resource.rb', line 17

def name
  source["ChGroupName"]
end

#orderInteger?

Returns:

  • (Integer, nil)


22
23
24
25
26
# File 'lib/syoboi_calendar/resources/channel_group_resource.rb', line 22

def order
  if source["ChGroupOrder"]
    source["ChGroupOrder"].to_i
  end
end