Method: Cog::DSL::SeedDSL#method_missing
- Defined in:
- lib/cog/dsl/seed_dsl.rb
#method_missing(meth, *args, &block) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/cog/dsl/seed_dsl.rb', line 33 def method_missing(meth, *args, &block) meth = meth.to_s if meth.end_with? '_feature' opt = args.last.is_a?(Hash) ? args.pop : {} if /(?:\b|_)(public|protected|private)(?:\b|_)/ =~ meth opt[:access] = $1.to_sym end if /(?:\b|_)(abstract|virtual)(?:\b|_)/ =~ meth opt[$1.to_sym] = true end args << opt feature(*args, &block) else super end end |