Module: NurseAndrea::SelfFilter
- Defined in:
- lib/nurse_andrea/self_filter.rb
Constant Summary collapse
- SELF_INDICATORS =
%w[nurseandrea nurse-andrea nurse_andrea].freeze
Class Method Summary collapse
Class Method Details
.host_matches?(*candidates) ⇒ Boolean
22 23 24 25 26 |
# File 'lib/nurse_andrea/self_filter.rb', line 22 def host_matches?(*candidates) candidates.compact.map(&:to_s).map(&:downcase).any? do |s| SELF_INDICATORS.any? { |i| s.include?(i) } end end |
.platform_self? ⇒ Boolean
13 14 15 16 |
# File 'lib/nurse_andrea/self_filter.rb', line 13 def platform_self? return @platform_self if defined?(@platform_self) @platform_self = compute_platform_self end |
.reset! ⇒ Object
18 19 20 |
# File 'lib/nurse_andrea/self_filter.rb', line 18 def reset! remove_instance_variable(:@platform_self) if defined?(@platform_self) end |