Method: HTTParty::ModuleInheritableAttributes::ClassMethods#mattr_inheritable

Defined in:
lib/httparty/module_inheritable_attributes.rb

#mattr_inheritable(*args) ⇒ Object



25
26
27
28
29
30
31
32
33
34
# File 'lib/httparty/module_inheritable_attributes.rb', line 25

def mattr_inheritable(*args)
  @mattr_inheritable_attrs ||= [:mattr_inheritable_attrs]
  @mattr_inheritable_attrs += args

  args.each do |arg|
    module_eval %(class << self; attr_accessor :#{arg} end)
  end

  @mattr_inheritable_attrs
end