Class: RhetButler::SlideContents::Embed
- Inherits:
-
RhetButler::SlideContents
- Object
- YamlType
- RhetButler::SlideContents
- RhetButler::SlideContents::Embed
- Defined in:
- lib/rhet-butler/slide-contents/embed.rb
Instance Attribute Summary collapse
-
#filters ⇒ Object
Returns the value of attribute filters.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from RhetButler::SlideContents
#html_class, #normalize_config, #setup_defaults
Methods inherited from YamlType
#check_config_hash, #init_with, #initialize, register, #setup_defaults, #value_from_config
Constructor Details
This class inherits a constructor from RhetButler::YamlType
Instance Attribute Details
#filters ⇒ Object
Returns the value of attribute filters.
22 23 24 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 22 def filters @filters end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
21 22 23 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 21 def source @source end |
Class Method Details
.optional_config ⇒ Object
13 14 15 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 13 def self.optional_config %w{filters} end |
.required_config ⇒ Object
9 10 11 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 9 def self.required_config %w{source} end |
Instance Method Details
#configure ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 24 def configure value_from_config("source") do |source| @source = source end value_from_config("filters") do |value| @filters = value end end |
#content(file_set) ⇒ Object
34 35 36 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 34 def content(file_set) "\n" + file_set.contents(source) + "\n" end |
#positional_options ⇒ Object
17 18 19 |
# File 'lib/rhet-butler/slide-contents/embed.rb', line 17 def %w{source} end |