class ActsAsSpan::SpanInstance
Attributes
acts_as_span_definition[R]
name[R]
span_model[R]
Public Class Methods
new(name, span_model, acts_as_span_definition)
click to toggle source
# File lib/acts_as_span/span_instance.rb, line 19 def initialize(name, span_model, acts_as_span_definition) @name = name @span_model = span_model @acts_as_span_definition = acts_as_span_definition end
Public Instance Methods
end_date()
click to toggle source
# File lib/acts_as_span/span_instance.rb, line 33 def end_date span_model[end_field] end
end_date_changed?()
click to toggle source
# File lib/acts_as_span/span_instance.rb, line 41 def end_date_changed? span_model.will_save_change_to_attribute?(end_field) end
span_klass()
click to toggle source
# File lib/acts_as_span/span_instance.rb, line 25 def span_klass @span_klass ||= span_model.class end
start_date()
click to toggle source
# File lib/acts_as_span/span_instance.rb, line 29 def start_date span_model[start_field] end
start_date_changed?()
click to toggle source
# File lib/acts_as_span/span_instance.rb, line 37 def start_date_changed? span_model.will_save_change_to_attribute?(start_field) end