Class: RichSnippetWidget

Inherits:
Widget
  • Object
show all
Defined in:
app/models/rich_snippet_widget.rb

Instance Method Summary collapse

Instance Method Details

#moduleObject



8
9
10
# File 'app/models/rich_snippet_widget.rb', line 8

def module
  self.snippet.module
end

#to_jsonObject



17
18
19
# File 'app/models/rich_snippet_widget.rb', line 17

def to_json
  snippet.to_json(true).to_json
end

#typeObject



4
5
6
# File 'app/models/rich_snippet_widget.rb', line 4

def type
  self.snippet.type
end

#warningsObject



12
13
14
15
# File 'app/models/rich_snippet_widget.rb', line 12

def warnings
  return ['No snippet selected'] if snippet.blank?
  snippet.warnings
end