Class: Pageflow::WidgetType::Null

Inherits:
Pageflow::WidgetType show all
Defined in:
lib/pageflow/widget_type.rb

Instance Method Summary collapse

Methods inherited from Pageflow::WidgetType

#enabled_in_editor?, #enabled_in_preview?, #insert_point, #render_head_fragment, #render_head_fragment_with_configuration, #render_with_configuration, #translation_key

Constructor Details

#initialize(role) ⇒ Null

Returns a new instance of Null.



64
65
66
# File 'lib/pageflow/widget_type.rb', line 64

def initialize(role)
  @role = role
end

Instance Method Details

#nameObject



68
69
70
# File 'lib/pageflow/widget_type.rb', line 68

def name
  'null'
end

#renderObject



76
77
78
# File 'lib/pageflow/widget_type.rb', line 76

def render(*)
  ''
end

#rolesObject



72
73
74
# File 'lib/pageflow/widget_type.rb', line 72

def roles
  [@role]
end