Class: Brightcontent::ViewLookup::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/brightcontent/view_lookup/base.rb

Direct Known Subclasses

FilterField, FormField, ListField

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(view_context, options) ⇒ Base

Returns a new instance of Base.



8
9
10
11
# File 'lib/brightcontent/view_lookup/base.rb', line 8

def initialize(view_context, options)
  @view_context = view_context
  @options = options.symbolize_keys
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/brightcontent/view_lookup/base.rb', line 6

def options
  @options
end

#view_contextObject (readonly)

Returns the value of attribute view_context.



6
7
8
# File 'lib/brightcontent/view_lookup/base.rb', line 6

def view_context
  @view_context
end

Instance Method Details

#callObject



13
14
15
# File 'lib/brightcontent/view_lookup/base.rb', line 13

def call
  render_by_field_name || render_by_type || render_by_association_type || render_default
end