Module: Docs::ExampleHelper
- Included in:
- ERBEnvironment, Project, Spec
- Defined in:
- lib/docs/example/helper.rb
Instance Method Summary collapse
Instance Method Details
#example(source_or_output, name) ⇒ Object
10 11 12 13 |
# File 'lib/docs/example/helper.rb', line 10 def example(source_or_output, name) raise ArgumentError, "Must specify :source or :output as first argument" unless [:source, :output].include?(source_or_output) @examples["examples/#{name}"].send(source_or_output) end |