Sha256: 50b5e52250902a16890d6a5dfc5128c1e53f4fd434c235dd9934cd714941106f
Contents?: true
Size: 524 Bytes
Versions: 11
Compression:
Stored size: 524 Bytes
Contents
module Mousetrap class Plan < Resource attr_accessor \ :code, :name def self.all response = get_resources plural_resource_name return [] unless response['plans'] build_resources_from response end protected def self.plural_resource_name 'plans' end def self.singular_resource_name 'plan' end def self.attributes_from_api(attributes) { :code => attributes['code'], :name => attributes['name'] } end end end
Version data entries
11 entries across 11 versions & 4 rubygems