Class: Opengraphplus::Generators::BaseGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Opengraphplus::Generators::BaseGenerator
show all
- Defined in:
- lib/generators/opengraphplus/base_generator.rb
Constant Summary
collapse
- API_KEY_PREFIX =
"ogp_"
Instance Method Summary
collapse
Instance Method Details
#validate_api_key ⇒ Object
13
14
15
16
17
18
|
# File 'lib/generators/opengraphplus/base_generator.rb', line 13
def validate_api_key
unless api_key.start_with?(API_KEY_PREFIX)
say_status :error, "Invalid API key: must start with '#{API_KEY_PREFIX}'", :red
raise SystemExit
end
end
|