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.


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

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


113
114
115
# File 'app/helpers/backend/timeline_helper.rb', line 113

def record
  @record
end

#sideObject (readonly)

Returns the value of attribute side


113
114
115
# File 'app/helpers/backend/timeline_helper.rb', line 113

def side
  @side
end

Instance Method Details

#authorObject


122
123
124
# File 'app/helpers/backend/timeline_helper.rb', line 122

def author
  @record.creator
end

#inspectObject


126
127
128
# File 'app/helpers/backend/timeline_helper.rb', line 126

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