Class: Whatever

Inherits:
BaseFactory show all
Defined in:
lib/gorillib/factories.rb

Overview

Factory that accepts whatever given and uses it directly -- no nothin'

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Whatever

Returns a new instance of Whatever.



184
185
186
187
# File 'lib/gorillib/factories.rb', line 184

def initialize(options={})
  options.slice!(:convert, :blankish)
  super(options)
end

Class Method Details

.receive(obj) ⇒ Object



191
192
193
# File 'lib/gorillib/factories.rb', line 191

def self.receive(obj)
  obj
end

Instance Method Details

#blankish?(obj) ⇒ Boolean

Returns:

  • (Boolean)


189
# File 'lib/gorillib/factories.rb', line 189

def blankish?(obj) false ; end

#native?(obj) ⇒ Boolean

Returns:

  • (Boolean)


188
# File 'lib/gorillib/factories.rb', line 188

def native?(obj)   true  ; end

#receive(obj) ⇒ Object



190
# File 'lib/gorillib/factories.rb', line 190

def receive(obj)   obj   ; end