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?, #render_head_fragment, #translation_key

Constructor Details

#initialize(role) ⇒ Null

Returns a new instance of Null


35
36
37
# File 'lib/pageflow/widget_type.rb', line 35

def initialize(role)
  @role = role
end

Instance Method Details

#nameObject


39
40
41
# File 'lib/pageflow/widget_type.rb', line 39

def name
  'null'
end

#renderObject


47
48
49
# File 'lib/pageflow/widget_type.rb', line 47

def render(*)
  ''
end

#rolesObject


43
44
45
# File 'lib/pageflow/widget_type.rb', line 43

def roles
  [@role]
end