Module: Saper

Defined in:
lib/saper.rb,
lib/saper/version.rb,
lib/saper/core/dsl.rb,
lib/saper/items/xml.rb,
lib/saper/items/url.rb,
lib/saper/core/type.rb,
lib/saper/core/item.rb,
lib/saper/items/json.rb,
lib/saper/items/atom.rb,
lib/saper/items/html.rb,
lib/saper/items/time.rb,
lib/saper/core/error.rb,
lib/saper/items/text.rb,
lib/saper/core/stack.rb,
lib/saper/core/recipe.rb,
lib/saper/core/action.rb,
lib/saper/core/logger.rb,
lib/saper/core/result.rb,
lib/saper/actions/save.rb,
lib/saper/core/browser.rb,
lib/saper/actions/find.rb,
lib/saper/core/runtime.rb,
lib/saper/actions/fetch.rb,
lib/saper/core/keychain.rb,
lib/saper/actions/split.rb,
lib/saper/items/nothing.rb,
lib/saper/core/argument.rb,
lib/saper/arguments/url.rb,
lib/saper/items/document.rb,
lib/saper/core/namespace.rb,
lib/saper/items/markdown.rb,
lib/saper/arguments/text.rb,
lib/saper/actions/replace.rb,
lib/saper/arguments/xpath.rb,
lib/saper/actions/nothing.rb,
lib/saper/actions/get_text.rb,
lib/saper/arguments/recipe.rb,
lib/saper/arguments/service.rb,
lib/saper/actions/skip_tags.rb,
lib/saper/actions/set_input.rb,
lib/saper/actions/find_first.rb,
lib/saper/arguments/timezone.rb,
lib/saper/arguments/variable.rb,
lib/saper/actions/run_recipe.rb,
lib/saper/actions/remove_tags.rb,
lib/saper/actions/append_with.rb,
lib/saper/arguments/attribute.rb,
lib/saper/actions/create_atom.rb,
lib/saper/actions/remove_after.rb,
lib/saper/actions/prepend_with.rb,
lib/saper/actions/get_contents.rb,
lib/saper/actions/get_variable.rb,
lib/saper/actions/remove_before.rb,
lib/saper/actions/get_attribute.rb,
lib/saper/actions/convert_to_xml.rb,
lib/saper/actions/select_matching.rb,
lib/saper/actions/convert_to_time.rb,
lib/saper/actions/remove_matching.rb,
lib/saper/actions/convert_to_html.rb,
lib/saper/actions/convert_to_json.rb,
lib/saper/actions/fetch_with_token.rb,
lib/saper/actions/convert_to_markdown.rb,
lib/saper/actions/run_recipe_and_save.rb

Defined Under Namespace

Modules: Actions, Arguments, DSL, Errors, Items Classes: Action, Argument, Browser, Error, Item, Keychain, Logger, Namespace, Recipe, Result, Runtime, Stack, Type

Constant Summary collapse

VERSION =
"0.5.3"

Class Method Summary collapse

Class Method Details

.load(path) ⇒ Saper::Namespace

Parses recipes saved in a file.


15
16
17
# File 'lib/saper/core/namespace.rb', line 15

def self.load(path)
  Namespace.parse File.read(path)
end

.run_from_file(file, recipe, input = nil, opts = {}) ⇒ Saper::Runtime

Runs a recipe saved in a file.


8
9
10
# File 'lib/saper/core/namespace.rb', line 8

def self.run_from_file(file, recipe, input = nil, opts = {})
  load(file).run(recipe, input, opts)
end