Top Level Namespace
Defined Under Namespace
Modules: ActiveRecord, Erb, ScaffoldController, Scaffoldhub
Classes: NewScaffoldGenerator, ScaffoldhubGenerator
Instance Method Summary
collapse
Instance Method Details
#define_dsl_attributes(*syms) ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'lib/scaffoldhub/specification.rb', line 19
def define_dsl_attributes(*syms)
syms.each do |sym|
class_eval(<<-EOS, __FILE__, __LINE__)
def #{sym}(val)
self.class.#{sym} = val
end
EOS
end
end
|
#define_dsl_file_keyword(*syms) ⇒ Object
29
30
31
32
33
34
35
36
37
|
# File 'lib/scaffoldhub/specification.rb', line 29
def define_dsl_file_keyword(*syms)
syms.each do |sym|
class_eval(<<-EOS, __FILE__, __LINE__)
def #{sym}(src, options = {})
file(src, options, :#{sym})
end
EOS
end
end
|
#mattr_accessor(*syms) ⇒ Object
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/scaffoldhub/specification.rb', line 3
def mattr_accessor(*syms)
syms.each do |sym|
class_eval(<<-EOS, __FILE__, __LINE__)
@@#{sym} = nil
def self.#{sym}
@@#{sym}
end
def self.#{sym}=(obj)
@@#{sym} = obj
end
EOS
end
end
|