Module: Roda::RodaPlugins::Sprockets::InstanceMethods

Includes:
Sprockets::Helpers
Defined in:
lib/roda/plugins/sprockets.rb

Instance Method Summary collapse

Instance Method Details

#opal_require(file) ⇒ Object

Require Opal assets



119
120
121
122
123
124
125
126
127
# File 'lib/roda/plugins/sprockets.rb', line 119

def opal_require file
  "    <script>\n      Opal.loaded(typeof(OpalLoaded) === \"undefined\" ? [] : OpalLoaded);\n      Opal.require(\#{file.to_json});\n    </script>\n  END\n  .gsub(/\\s+/, ' ')\nend\n"

#sprockets_helpers_settingsObject

Overload of Sprockets::Helpers#sprockets_helpers_settings to support polyinstantiation



114
115
116
# File 'lib/roda/plugins/sprockets.rb', line 114

def sprockets_helpers_settings
  sprockets_options[:sprockets_helpers]
end

#sprockets_optionsObject



109
110
111
# File 'lib/roda/plugins/sprockets.rb', line 109

def sprockets_options
  self.class.sprockets_options
end