Class: Clever::Types::Term

Inherits:
Base
  • Object
show all
Defined in:
lib/clever/types/term.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#blank?, #presence, #to_h

Constructor Details

#initialize(attributes = {}) ⇒ Term

Returns a new instance of Term.



11
12
13
14
15
16
# File 'lib/clever/types/term.rb', line 11

def initialize(attributes = {}, *)
  @uid        = attributes['id']
  @name       = attributes['name']
  @start_date = attributes['start_date']
  @end_date   = attributes['end_date']
end

Instance Attribute Details

#end_dateObject (readonly)

Returns the value of attribute end_date.



6
7
8
# File 'lib/clever/types/term.rb', line 6

def end_date
  @end_date
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/clever/types/term.rb', line 6

def name
  @name
end

#start_dateObject (readonly)

Returns the value of attribute start_date.



6
7
8
# File 'lib/clever/types/term.rb', line 6

def start_date
  @start_date
end

#uidObject (readonly)

Returns the value of attribute uid.



6
7
8
# File 'lib/clever/types/term.rb', line 6

def uid
  @uid
end