class Tudu::Dsl

Tudu::Dsl

Constants

TARGET_TYPES
== TARGET_TYPES
notice target types
=== types
  • none: no notice

  • mail: mail notice

Attributes

_target_type[RW]

notice target type

_targets[RW]

notice targets

Public Class Methods

new() click to toggle source

initialize Dsl

# File lib/tudu_dsl.rb, line 19
def initialize
  @_target_type = TARGET_TYPES[:none]
  @_targets = []
end

Public Instance Methods

target_type(target_type) click to toggle source
== initialize Dsl
=== Params
# File lib/tudu_dsl.rb, line 27
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
targets(target_type) click to toggle source
# File lib/tudu_dsl.rb, line 35
def targets(target_type)
  return if target_type.nil?
  return unless target_type.instance_of? Array
  @_targets = target_type
end