Class: Printavo::Status

Inherits:
Models::Base show all
Defined in:
lib/printavo/models/status.rb

Instance Method Summary collapse

Methods inherited from Models::Base

#==, #[], #dig, #initialize, #inspect, #to_h

Constructor Details

This class inherits a constructor from Printavo::Models::Base

Instance Method Details

#colorObject



8
# File 'lib/printavo/models/status.rb', line 8

def color = self['color']

#idObject



6
# File 'lib/printavo/models/status.rb', line 6

def id    = self['id']

#keyObject

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

#nameObject



7
# File 'lib/printavo/models/status.rb', line 7

def name  = self['name']