Class: Cup::Cupfile::DSL::JavascriptsDSL

Inherits:
BasicObject
Defined in:
lib/cup/cupfile.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cupfile) ⇒ JavascriptsDSL

Returns a new instance of JavascriptsDSL.



118
119
120
# File 'lib/cup/cupfile.rb', line 118

def initialize cupfile
  @cupfile = cupfile
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



127
128
129
# File 'lib/cup/cupfile.rb', line 127

def method_missing name, *args, &block
  @cupfile.send :set_javascript_patterns_for, name, *(args.flatten)
end

Class Method Details

.interpret(cupfile, &block) ⇒ Object



122
123
124
125
# File 'lib/cup/cupfile.rb', line 122

def self.interpret cupfile, &block
  new(cupfile).instance_eval &block
  cupfile
end