Class: Reactor::Workflow::Comment

Inherits:
Struct
  • Object
show all
Defined in:
lib/reactor/workflow/comment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log_entry) ⇒ Comment

Returns a new instance of Comment.



4
5
6
7
8
9
10
11
12
13
# File 'lib/reactor/workflow/comment.rb', line 4

def initialize(log_entry)
  super(
    parse_time(log_entry["logTime"]),
    log_entry["logText"],
    log_entry["logType"],
    log_entry["objectId"],
    log_entry["receiver"],
    log_entry["userLogin"]
  )
end

Instance Attribute Details

#obj_idObject

Returns the value of attribute obj_id

Returns:

  • (Object)

    the current value of obj_id



3
4
5
# File 'lib/reactor/workflow/comment.rb', line 3

def obj_id
  @obj_id
end

#receiverObject

Returns the value of attribute receiver

Returns:

  • (Object)

    the current value of receiver



3
4
5
# File 'lib/reactor/workflow/comment.rb', line 3

def receiver
  @receiver
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



3
4
5
# File 'lib/reactor/workflow/comment.rb', line 3

def text
  @text
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



3
4
5
# File 'lib/reactor/workflow/comment.rb', line 3

def time
  @time
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



3
4
5
# File 'lib/reactor/workflow/comment.rb', line 3

def type
  @type
end

#userObject

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



3
4
5
# File 'lib/reactor/workflow/comment.rb', line 3

def user
  @user
end

Instance Method Details

#objectObject Also known as: obj



15
16
17
# File 'lib/reactor/workflow/comment.rb', line 15

def object
  ::AbstractObj.find(obj_id)
end