Class: Backend::TimelineHelper::Timeline::SideStep

Inherits:
Step
  • Object
show all
Defined in:
app/helpers/backend/timeline_helper.rb

Instance Attribute Summary collapse

Attributes inherited from Step

#at, #name

Instance Method Summary collapse

Methods inherited from Step

#<=>

Constructor Details

#initialize(side, at, record) ⇒ SideStep

Returns a new instance of SideStep.


117
118
119
120
121
122
# File 'app/helpers/backend/timeline_helper.rb', line 117

def initialize(side, at, record)
  @side = side
  @record = record
  at ||= record.created_at
  super(at, @record.send(side.label_method))
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record


115
116
117
# File 'app/helpers/backend/timeline_helper.rb', line 115

def record
  @record
end

#sideObject (readonly)

Returns the value of attribute side


115
116
117
# File 'app/helpers/backend/timeline_helper.rb', line 115

def side
  @side
end

Instance Method Details

#authorObject


124
125
126
# File 'app/helpers/backend/timeline_helper.rb', line 124

def author
  @record.creator
end

#inspectObject


128
129
130
# File 'app/helpers/backend/timeline_helper.rb', line 128

def inspect
  "<Step #{@side.name} #{@at ? @at.l : @at.inspect} #{@record.id}>"
end