Class: Osmer::Schema::Base::Dsl

Inherits:
Struct
  • Object
show all
Defined in:
lib/osmer/schema/base.rb

Direct Known Subclasses

Custom::Dsl, Osm2pgsql::Dsl

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/osmer/schema/base.rb', line 54

def method_missing(method, *args)
  if schema.respond_to?("#{method}=") && !args.empty?
    if args.size > 1
      schema.send "#{method}=", args
    else
      schema.send "#{method}=", args.first
    end
  else
    super
  end
end