Sha256: 25be311bd190d7ed87b992af038e7e7e7105ea31db7f8a895b7d5bdab1a94402
Contents?: true
Size: 934 Bytes
Versions: 1
Compression:
Stored size: 934 Bytes
Contents
module Transcriber class Resource autoload :Serialization, 'transcriber/resource/serialization' autoload :Properties, 'transcriber/resource/properties' autoload :Property, 'transcriber/resource/properties/property' autoload :Embeddables, 'transcriber/resource/embeddables' autoload :Embeddable, 'transcriber/resource/embeddables/embeddable' autoload :Parser, 'transcriber/resource/parser' autoload :Responses, 'transcriber/resource/responses' extend Properties extend Embeddables extend Parser include Serialization def initialize(attrs = {}) attrs.map {|name, value| send("#{name}=", value)} end def self.keys @keys ||= [] end def self.resources(entries) {entries: entries.map(&:resource)} end def resource self.class.keys.inject({}) {|buffer, key| buffer.merge key.to_resource(self)} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
transcriber-0.0.1 | lib/transcriber/resource.rb |