module Representable::Render::Nil
Constants
- VERSION
Public Class Methods
included(base)
click to toggle source
# File lib/representable/render/nil.rb, line 7 def self.included(base) base.class_eval do def initialize(sym, options={}) @name = sym.to_s @options = options @options[:default] ||= [] if array? @options[:render_nil] = true if @options[:render_nil].nil? end end end
new(sym, options={})
click to toggle source
# File lib/representable/render/nil.rb, line 9 def initialize(sym, options={}) @name = sym.to_s @options = options @options[:default] ||= [] if array? @options[:render_nil] = true if @options[:render_nil].nil? end