Sha256: 14cad7586fbbf9b5301e533b3961fc52906c84842d2257125ff848e2e6466904
Contents?: true
Size: 690 Bytes
Versions: 1
Compression:
Stored size: 690 Bytes
Contents
module Axel module ServiceResource module AutomaticResource extend ActiveSupport::Concern module ClassMethods # Name the resource. Used if you call your class Foo but the API # Proxy know it as "Bar". This will resolve that configuration # disconnect def resource_name(name = nil) @_resource_name = name.to_s.underscore.pluralize if name @_resource_name || self.name.split("::").last.underscore.pluralize end # Resource object that holds configuration information about the service # and path def resource Axel.resources[resource_name] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axel-0.0.1 | app/models/axel/service_resource/automatic_resource.rb |