Class: Brightcontent::ViewLookup::Base
- Inherits:
-
Object
- Object
- Brightcontent::ViewLookup::Base
- Defined in:
- lib/brightcontent/view_lookup/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#view_context ⇒ Object
readonly
Returns the value of attribute view_context.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(view_context, options) ⇒ Base
constructor
A new instance of Base.
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, ) @view_context = view_context @options = .symbolize_keys end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/brightcontent/view_lookup/base.rb', line 6 def @options end |
#view_context ⇒ Object (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
#call ⇒ Object
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 |