Class: Siphon::Adapter

Inherits:
Object
  • Object
show all
Defined in:
lib/siphon/adapter.rb

Overview

Adapter

use : determine which scope will not be called &

set args to nil for 'argless' scopes

Instance Method Summary collapse

Constructor Details

#initialize(formobj) ⇒ Adapter

Returns a new instance of Adapter.



12
13
14
15
16
17
# File 'lib/siphon/adapter.rb', line 12

def initialize(formobj)
  @formobj = formobj

  @scopes_hash = assign_scope_hashes @formobj
  @argless     = argless_list @formobj
end

Instance Method Details

#callObject



19
20
21
22
# File 'lib/siphon/adapter.rb', line 19

def call
  filterout_empty_string_and_nil
  apply_nil_on_argless_scopes
end