class Atum::Core::Resource
A resource with methods mapped to API links.
Public Class Methods
new(links)
click to toggle source
Instantiate a resource.
@param links [Hash<String,Link>] A hash that maps method names to links.
# File lib/atum/core/resource.rb, line 8 def initialize(links) links.each do |name, link| define_singleton_method(name) { |*args| link.run(*args) } end end