Class: Reform::Representer::Options

Inherits:
Hash
  • Object
show all
Defined in:
lib/reform/representer.rb

Instance Method Summary collapse

Instance Method Details

#exclude!(names) ⇒ Object



19
20
21
22
# File 'lib/reform/representer.rb', line 19

def exclude!(names)
  excludes.push(*names) #if names.size > 0
  self
end

#excludesObject



24
25
26
# File 'lib/reform/representer.rb', line 24

def excludes
  self[:exclude] ||= []
end

#include!(names) ⇒ Object



14
15
16
17
# File 'lib/reform/representer.rb', line 14

def include!(names)
  includes.push(*names) #if names.size > 0
  self
end

#includesObject



28
29
30
# File 'lib/reform/representer.rb', line 28

def includes
  self[:include] ||= []
end