Class: Pikuri::Thunderbird::IcalLine::Attendee
- Inherits:
-
Data
- Object
- Data
- Pikuri::Thunderbird::IcalLine::Attendee
- Defined in:
- lib/pikuri/thunderbird/ical_line.rb
Overview
One attendee or organizer, parsed from an +ATTENDEE+/+ORGANIZER+ line.
email falls back from the EMAIL param to the mailto: value,
name from CN to the email — so both are always present.
Instance Attribute Summary collapse
-
#cutype ⇒ String?
readonly
Raw
CUTYPE(+"INDIVIDUAL"+, +"RESOURCE"+…). -
#email ⇒ String
readonly
The address, sans
mailto:. -
#name ⇒ String
readonly
Display name (+CN+), or the email when there's no CN.
-
#organizer ⇒ Boolean
readonly
Whether the line was an
ORGANIZER, not anATTENDEE. -
#role ⇒ String?
readonly
Raw
ROLE(+"REQ-PARTICIPANT"+,"OPT-PARTICIPANT"). -
#status ⇒ String?
readonly
Raw
PARTSTAT(+"ACCEPTED"+, +"NEEDS-ACTION"+…).
Instance Method Summary collapse
-
#optional? ⇒ Boolean
An optional invitee (+ROLE=OPT-PARTICIPANT+).
-
#organizer? ⇒ Boolean
The ORGANIZER (vs a plain attendee).
-
#resource? ⇒ Boolean
A room/equipment, not a person (+CUTYPE=RESOURCE+).
Instance Attribute Details
#cutype ⇒ String? (readonly)
Returns raw CUTYPE (+"INDIVIDUAL"+, +"RESOURCE"+…).
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 45 Attendee = Data.define(:name, :email, :status, :role, :cutype, :organizer) do # @return [Boolean] the ORGANIZER (vs a plain attendee). def organizer? = organizer # @return [Boolean] an optional invitee (+ROLE=OPT-PARTICIPANT+). def optional? = role == 'OPT-PARTICIPANT' # @return [Boolean] a room/equipment, not a person (+CUTYPE=RESOURCE+). def resource? = cutype == 'RESOURCE' end |
#email ⇒ String (readonly)
Returns the address, sans mailto:.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 45 Attendee = Data.define(:name, :email, :status, :role, :cutype, :organizer) do # @return [Boolean] the ORGANIZER (vs a plain attendee). def organizer? = organizer # @return [Boolean] an optional invitee (+ROLE=OPT-PARTICIPANT+). def optional? = role == 'OPT-PARTICIPANT' # @return [Boolean] a room/equipment, not a person (+CUTYPE=RESOURCE+). def resource? = cutype == 'RESOURCE' end |
#name ⇒ String (readonly)
Returns display name (+CN+), or the email when there's no CN.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 45 Attendee = Data.define(:name, :email, :status, :role, :cutype, :organizer) do # @return [Boolean] the ORGANIZER (vs a plain attendee). def organizer? = organizer # @return [Boolean] an optional invitee (+ROLE=OPT-PARTICIPANT+). def optional? = role == 'OPT-PARTICIPANT' # @return [Boolean] a room/equipment, not a person (+CUTYPE=RESOURCE+). def resource? = cutype == 'RESOURCE' end |
#organizer ⇒ Boolean (readonly)
Returns whether the line was an ORGANIZER, not an ATTENDEE.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 45 Attendee = Data.define(:name, :email, :status, :role, :cutype, :organizer) do # @return [Boolean] the ORGANIZER (vs a plain attendee). def organizer? = organizer # @return [Boolean] an optional invitee (+ROLE=OPT-PARTICIPANT+). def optional? = role == 'OPT-PARTICIPANT' # @return [Boolean] a room/equipment, not a person (+CUTYPE=RESOURCE+). def resource? = cutype == 'RESOURCE' end |
#role ⇒ String? (readonly)
Returns raw ROLE (+"REQ-PARTICIPANT"+, "OPT-PARTICIPANT").
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 45 Attendee = Data.define(:name, :email, :status, :role, :cutype, :organizer) do # @return [Boolean] the ORGANIZER (vs a plain attendee). def organizer? = organizer # @return [Boolean] an optional invitee (+ROLE=OPT-PARTICIPANT+). def optional? = role == 'OPT-PARTICIPANT' # @return [Boolean] a room/equipment, not a person (+CUTYPE=RESOURCE+). def resource? = cutype == 'RESOURCE' end |
#status ⇒ String? (readonly)
Returns raw PARTSTAT (+"ACCEPTED"+, +"NEEDS-ACTION"+…).
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 45 Attendee = Data.define(:name, :email, :status, :role, :cutype, :organizer) do # @return [Boolean] the ORGANIZER (vs a plain attendee). def organizer? = organizer # @return [Boolean] an optional invitee (+ROLE=OPT-PARTICIPANT+). def optional? = role == 'OPT-PARTICIPANT' # @return [Boolean] a room/equipment, not a person (+CUTYPE=RESOURCE+). def resource? = cutype == 'RESOURCE' end |
Instance Method Details
#optional? ⇒ Boolean
Returns an optional invitee (+ROLE=OPT-PARTICIPANT+).
50 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 50 def optional? = role == 'OPT-PARTICIPANT' |
#organizer? ⇒ Boolean
Returns the ORGANIZER (vs a plain attendee).
47 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 47 def organizer? = organizer |
#resource? ⇒ Boolean
Returns a room/equipment, not a person (+CUTYPE=RESOURCE+).
53 |
# File 'lib/pikuri/thunderbird/ical_line.rb', line 53 def resource? = cutype == 'RESOURCE' |