Sha256: 4041e8cf85d74ea31db3ef4bcdc263eb0a94150858804d879cbd0a1a2e74b6e4

Contents?: true

Size: 733 Bytes

Versions: 1

Compression:

Stored size: 733 Bytes

Contents

require 'hashie/dash'
require 'hashie/extensions/coercion'
require 'hashie/extensions/indifferent_access'

module Polytrix
  class Challenge < Hashie::Dash
    include Hashie::Extensions::Coercion
    include Hashie::Extensions::IndifferentAccess
    property :name
    property :implementor
    property :vars, :default => {}
    property :source_file
    coerce_key :source_file, Pathname
    property :basedir
    coerce_key :basedir, Pathname
    property :challenge_runner, :default => ChallengeRunner.createRunner
    property :result
    property :env_file
    coerce_key :vars, Polytrix::Manifest::Environment
    property :plugin_data, :default => {}

    def run
      challenge_runner.run_challenge self
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polytrix-0.0.1 lib/polytrix/challenge.rb