Module: Mumuki::Domain::Status
- Extended by:
- ActiveSupport::Concern
- Included in:
- Discussion, Submission
- Defined in:
- lib/mumuki/domain/status.rb
Defined Under Namespace
Modules: Discussion, Submission
Instance Method Summary
collapse
Instance Method Details
#==(other) ⇒ Object
24
25
26
|
# File 'lib/mumuki/domain/status.rb', line 24
def ==(other)
self.equal? parent.to_mumuki_status(other) rescue false
end
|
#as_json(_options = {}) ⇒ Object
28
29
30
|
# File 'lib/mumuki/domain/status.rb', line 28
def as_json(_options={})
to_s
end
|
#dup ⇒ Object
32
33
34
|
# File 'lib/mumuki/domain/status.rb', line 32
def dup
self
end
|
#to_i ⇒ Object
16
17
18
|
# File 'lib/mumuki/domain/status.rb', line 16
def to_i
parent::STATUSES.index(self)
end
|
#to_s ⇒ Object
12
13
14
|
# File 'lib/mumuki/domain/status.rb', line 12
def to_s
name.demodulize.underscore
end
|
#to_sym ⇒ Object
20
21
22
|
# File 'lib/mumuki/domain/status.rb', line 20
def to_sym
to_s.to_sym
end
|