Module: EasyParams::DSL
- Defined in:
- lib/easy_params/dsl.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
11
12
13
|
# File 'lib/easy_params/dsl.rb', line 11
def method_missing(method_name, *args, &block)
public_send(:attribute, method_name, *args, &block)
end
|
Instance Method Details
#each(&block) ⇒ Object
3
4
5
|
# File 'lib/easy_params/dsl.rb', line 3
def each(&block)
array.of(struct_dsl, &block)
end
|
#has(&block) ⇒ Object
7
8
9
|
# File 'lib/easy_params/dsl.rb', line 7
def has(&block)
struct_dsl(&block)
end
|