Sha256: 58b5f85178fe8d5a1fade084dc44b576a6dcb1dccac5fb42b7bbc1d2e75e3e8c
Contents?: true
Size: 1.03 KB
Versions: 2
Compression:
Stored size: 1.03 KB
Contents
# encoding: utf-8 require 'tudu/version' module Tudu # = Tudu::Dsl class Dsl # == TARGET_TYPES # notice target types # === types #- none: no notice #- mail: mail notice TARGET_TYPES = { none: :none, mail: :mail } # == notice target type attr_accessor :_target_type # == notice targets attr_accessor :_targets # == initialize Dsl def initialize @_target_type = TARGET_TYPES[:none] @_targets = [] end # == initialize Dsl # === Params #- target_type: target notice type def target_type(target_type) return if target_type.nil? return unless [String, Symbol].include?(target_type.class) target_type = target_type.to_sym if target_type.instance_of? String return unless TARGET_TYPES.include? target_type @_target_type = target_type end def targets(target_type) return if target_type.nil? return unless target_type.instance_of? Array @_targets = target_type end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tudu-0.0.7 | lib/tudu_dsl.rb |
tudu-0.0.6 | lib/tudu_dsl.rb |