Class: RhetButler::SlideRenderers::Code
Class Method Summary
collapse
Instance Method Summary
collapse
#configure, #normalize_config, required_config, #setup_defaults
Methods inherited from YamlType
#check_config_hash, #init_with, #initialize, register, #setup_defaults, #value_from_config
Class Method Details
.optional_config ⇒ Object
6
7
8
|
# File 'lib/rhet-butler/slide-renderers/code.rb', line 6
def self.optional_config
%w{class}
end
|
Instance Method Details
#html_class ⇒ Object
14
15
16
|
# File 'lib/rhet-butler/slide-renderers/code.rb', line 14
def html_class
"code"
end
|
#positional_options ⇒ Object
10
11
12
|
# File 'lib/rhet-butler/slide-renderers/code.rb', line 10
def positional_options
%w{class}
end
|
#process(string) ⇒ Object
18
19
20
|
# File 'lib/rhet-butler/slide-renderers/code.rb', line 18
def process(string)
"<pre><code#{@config_hash ? " class='#{@config_hash['class']}'" : ""}>#{string}</code></pre>"
end
|