class Bliss::Client::Size
Public Class Methods
all()
click to toggle source
# File lib/bliss/client/size.rb, line 12 def self.all @all ||= begin response = Client.connection.get('sizes') if response.success? body = response.body body.map { |attr| new attr } else raise JSON.parse(response.body).fetch('message') end end end
find(id)
click to toggle source
# File lib/bliss/client/size.rb, line 24 def self.find(id) all.find { |size| size.id == id } end
Public Instance Methods
to_s()
click to toggle source
# File lib/bliss/client/size.rb, line 28 def to_s "#{rank} | #{name}" end