Module: AttrFilters::Utils
- Defined in:
- lib/attr_filters/utils.rb
Class Method Summary collapse
Class Method Details
.extract_options(attrs) ⇒ Object
5 6 7 8 9 |
# File 'lib/attr_filters/utils.rb', line 5 def self.(attrs) last = attrs.last = last.is_a?(::Hash) ? last : {} [attrs[0..-2], ] end |
.satisfied_spec?(spec_name) ⇒ Boolean
11 12 13 |
# File 'lib/attr_filters/utils.rb', line 11 def self.satisfied_spec?(spec_name) Gem.loaded_specs.key?(spec_name) end |