Class: Whatever

Inherits:
BaseFactory
  • Object
show all
Defined in:
lib/gorillib/model/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.



176
177
178
179
# File 'lib/gorillib/model/factories.rb', line 176

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

Class Method Details

.receive(obj) ⇒ Object



183
184
185
# File 'lib/gorillib/model/factories.rb', line 183

def self.receive(obj)
  obj
end

Instance Method Details

#blankish?(obj) ⇒ Boolean

Returns:

  • (Boolean)


181
# File 'lib/gorillib/model/factories.rb', line 181

def blankish?(obj) false ; end

#native?(obj) ⇒ Boolean

Returns:

  • (Boolean)


180
# File 'lib/gorillib/model/factories.rb', line 180

def native?(obj)   true  ; end

#receive(obj) ⇒ Object



182
# File 'lib/gorillib/model/factories.rb', line 182

def receive(obj)   obj   ; end