Class: AblyUi::Core::Code
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- AblyUi::Core::Code
- Includes:
- Util
- Defined in:
- lib/ably_ui/core/code/code.rb
Constant Summary
Constants included from Util
Instance Method Summary collapse
-
#initialize(language:, snippet:, text_size: 'ui-text-code1') ⇒ Code
constructor
A new instance of Code.
Methods included from Util
#abs_url, #append_random_postfix
Constructor Details
#initialize(language:, snippet:, text_size: 'ui-text-code1') ⇒ Code
Returns a new instance of Code.
5 6 7 8 9 |
# File 'lib/ably_ui/core/code/code.rb', line 5 def initialize(language:, snippet:, text_size: 'ui-text-code1') @language = language @snippet = snippet.try(:strip) @text_size = text_size end |