Class: AblyUi::Core::Code

Inherits:
ViewComponent::Base
  • Object
show all
Includes:
Util
Defined in:
lib/ably_ui/core/code/code.rb

Constant Summary

Constants included from Util

Util::DEFAULT_URL_BASE

Instance Method Summary collapse

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