Sha256: 958511b8086dcb1f8785adf27ba2f772b3dd6090d28af6d834ef02e43ea7a3dc
Contents?: true
Size: 461 Bytes
Versions: 47
Compression:
Stored size: 461 Bytes
Contents
module ApiClient module Mixins module Configuration def dsl_accessor(*names) options = names.last.is_a?(Hash) ? names.pop : {} names.each do |name| returns = options[:return_self] ? "self" : "@#{name}" class_eval <<-STR def #{name}(value = nil) value.nil? ? @#{name} : @#{name} = value #{returns} end STR end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems