Class: Isoics::Note

Inherits:
Object
  • Object
show all
Defined in:
lib/isoics/ics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(note) ⇒ Note

Returns a new instance of Note.

Parameters:

  • note (Hash)


7
8
9
# File 'lib/isoics/ics.rb', line 7

def initialize(note)
  @text, @ics_code = note.values_at(:text, :"ics-code")
end

Instance Attribute Details

#ics_codeString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/isoics/ics.rb', line 4

def ics_code
  @ics_code
end

#textString (readonly)

Returns:

  • (String)


4
5
6
# File 'lib/isoics/ics.rb', line 4

def text
  @text
end

Instance Method Details

#icsIsoics::ICS

Fetch referenced ICS.

Returns:



13
14
15
# File 'lib/isoics/ics.rb', line 13

def ics
  Isoics.fetch ics_code if ics_code
end