Module: CEML::CastingStatement

Extended by:
Forwardable
Defined in:
lib/ceml/casting.rb

Instance Method Summary collapse

Instance Method Details

#in_teams?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/ceml/casting.rb', line 18

def in_teams?
  type == :teams
end

#maxObject



10
11
12
# File 'lib/ceml/casting.rb', line 10

def max
  in_teams? ? 10000 : roles_phrase.max
end

#nab?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/ceml/casting.rb', line 22

def nab?
  type == :nab
end

#radiusObject



14
15
16
# File 'lib/ceml/casting.rb', line 14

def radius
  within.empty? ? 1600 * 50 : within.distance.meters
end

#typeObject



6
7
8
# File 'lib/ceml/casting.rb', line 6

def type
  elements.first.text_value.split.first.to_sym
end