Module: NeverBounce::CLI::Feature::RequireAttr::InstanceMethods

Defined in:
lib/never_bounce/cli/feature/require_attr.rb

Instance Method Summary collapse

Instance Method Details

#require_attr(name) ⇒ mixed (private)

Require attribute to be set. Return attribute value.

Returns:

  • (mixed)

18
19
20
21
22
# File 'lib/never_bounce/cli/feature/require_attr.rb', line 18

def require_attr(name)
  send(name).tap do |_|
    raise "Attribute must be set: #{name}" if _.nil?
  end
end