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



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

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+/, ' ').chop\nend\n"

#sprockets_helpers_settingsObject

Overload of Sprockets::Helpers#sprockets_helpers_settings to support polyinstantiation



116
117
118
# File 'lib/roda/plugins/sprockets.rb', line 116

def sprockets_helpers_settings
  sprockets_options[:sprockets_helpers]
end

#sprockets_optionsObject



111
112
113
# File 'lib/roda/plugins/sprockets.rb', line 111

def sprockets_options
  self.class.sprockets_options
end