lib/access/token.rb in access-2.0.50 vs lib/access/token.rb in access-2.0.51
- old
+ new
@@ -1,7 +1,8 @@
module Access
class Token
+ include Access::MuchMeta
def self.search(options = {})
# Internal Admin only Call
Access::Api.new.search_tokens options
end
@@ -14,13 +15,12 @@
def self.process_batch(chunk)
chunk.map { |token| new(token) }
end
def initialize(values)
- self.class.class_eval {attr_reader *values.keys }
- values.each do |attribute_name, attribute_value|
- self.instance_variable_set("@#{attribute_name}", attribute_value)
- end
+ @used_fields = []
+ set_up_methods(values)
+ set_values(values)
@links = Access::Link.new(@links) if @links
end
def has_scope?