Class: Disposable::Twin::Definition

Inherits:
Declarative::Definitions::Definition
  • Object
show all
Defined in:
lib/disposable/twin/definitions.rb

Defined Under Namespace

Classes: Each

Constant Summary collapse

Filter =

:private:

->(definitions, options) do
  definitions.collect do |dfn|
    next if options[:exclude]    and options[:exclude].include?(dfn[:name])
    next if options[:scalar]     and dfn[:collection]
    next if options[:collection] and ! dfn[:collection]
    next if options[:twin]       and ! dfn[:nested]
    dfn
  end.compact
end

Instance Method Summary collapse

Instance Method Details

#getterObject



3
4
5
# File 'lib/disposable/twin/definitions.rb', line 3

def getter
  self[:name]
end

#setterObject



7
8
9
# File 'lib/disposable/twin/definitions.rb', line 7

def setter
  "#{self[:name]}="
end