Class: Lanes::Screen::Definition
- Inherits:
-
Object
- Object
- Lanes::Screen::Definition
- Includes:
- Concerns::AttrAccessorWithDefault
- Defined in:
- lib/lanes/screen.rb
Instance Method Summary collapse
Instance Method Details
#to_json ⇒ Object
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/lanes/screen.rb', line 106 def to_json Oj.dump({ id: identifier, title: title, icon: icon, model: model_class, view: view_class, js: js, css: css, assets: [js, css].reject{|asset| asset.blank? }, group_id: group_id, extension: extension, url_prefix: url_prefix, description: description }, mode: :compat) end |
#url_path_for(type) ⇒ Object
97 98 99 100 101 102 103 104 |
# File 'lib/lanes/screen.rb', line 97 def url_path_for(type) file = self.send(type) if url_prefix "#{url_prefix}/#{file}" else "#{self.extension.underscore}/screens/#{file}" end end |