Class: Printavo::Status
- Inherits:
-
Models::Base
- Object
- Models::Base
- Printavo::Status
- Defined in:
- lib/printavo/models/status.rb
Instance Method Summary collapse
- #color ⇒ Object
- #id ⇒ Object
-
#key ⇒ Object
Returns a normalized symbol key matching Order#status_key.
- #name ⇒ Object
Methods inherited from Models::Base
#==, #[], #dig, #initialize, #inspect, #to_h
Constructor Details
This class inherits a constructor from Printavo::Models::Base
Instance Method Details
#color ⇒ Object
8 |
# File 'lib/printavo/models/status.rb', line 8 def color = self['color'] |
#id ⇒ Object
6 |
# File 'lib/printavo/models/status.rb', line 6 def id = self['id'] |
#key ⇒ Object
Returns a normalized symbol key matching Order#status_key. e.g. "In Production" => :in_production
12 13 14 15 16 |
# File 'lib/printavo/models/status.rb', line 12 def key return nil if name.nil? name.downcase.gsub(/\s+/, '_').to_sym end |
#name ⇒ Object
7 |
# File 'lib/printavo/models/status.rb', line 7 def name = self['name'] |