Class: RhetButler::SlideContents::Embed

Inherits:
RhetButler::SlideContents show all
Defined in:
lib/rhet-butler/slide-contents/embed.rb

Instance Attribute Summary collapse

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

#filtersObject

Returns the value of attribute filters.



22
23
24
# File 'lib/rhet-butler/slide-contents/embed.rb', line 22

def filters
  @filters
end

#sourceObject (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_configObject



13
14
15
# File 'lib/rhet-butler/slide-contents/embed.rb', line 13

def self.optional_config
  %w{filters}
end

.required_configObject



9
10
11
# File 'lib/rhet-butler/slide-contents/embed.rb', line 9

def self.required_config
  %w{source}
end

Instance Method Details

#configureObject



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_optionsObject



17
18
19
# File 'lib/rhet-butler/slide-contents/embed.rb', line 17

def positional_options
  %w{source}
end