Sha256: 46ae38fc8e6073324f700796fa8574b0016edd54c98c071e326de0df6f2d242a
Contents?: true
Size: 619 Bytes
Versions: 16
Compression:
Stored size: 619 Bytes
Contents
class ForestLiana::Collection mattr_accessor :collection_name def self.fields(fields) collection = ForestLiana::Model::Collection.new({ name: self.collection_name, fields: fields }) ForestLiana.apimap << collection end def self.action(name, opts = {}) collection = ForestLiana.apimap.find do |x| x.name == self.collection_name.try(:to_s) end return if collection.blank? collection.actions << ForestLiana::Model::Action.new({ name: name, http_method: opts[:http_method], endpoint: opts[:endpoint], fields: opts[:fields] }) end end
Version data entries
16 entries across 16 versions & 1 rubygems