Class: PowerApi::GeneratorHelper::SimpleTokenAuthHelper::SimpleTokenAuthResource
- Inherits:
-
Object
- Object
- PowerApi::GeneratorHelper::SimpleTokenAuthHelper::SimpleTokenAuthResource
- Includes:
- ActiveRecordResource, ResourceHelper
- Defined in:
- lib/power_api/generator_helper/simple_token_auth_helper.rb
Instance Method Summary collapse
- #authenticated_resource_migration ⇒ Object
-
#initialize(resource) ⇒ SimpleTokenAuthResource
constructor
A new instance of SimpleTokenAuthResource.
Methods included from ResourceHelper
#parent_resource=, #parent_resource?, #resource=, #resource_attributes=
Methods included from ActiveRecordResource
#attributes_names, #attributes_symbols_text_list, #camel, #camel_plural, #class_definition_line, #id, #optional_resource_attributes, #path, #permitted_attributes, #permitted_attributes_names, #permitted_attributes_symbols_text_list, #plural, #plural_titleized, #required_attributes_names, #required_resource_attributes, #resource_attributes=, #resource_name=, #snake_case, #titleized, #upcase, #upcase_plural
Constructor Details
#initialize(resource) ⇒ SimpleTokenAuthResource
Returns a new instance of SimpleTokenAuthResource.
8 9 10 |
# File 'lib/power_api/generator_helper/simple_token_auth_helper.rb', line 8 def initialize(resource) self.resource_name = resource end |
Instance Method Details
#authenticated_resource_migration ⇒ Object
12 13 14 15 |
# File 'lib/power_api/generator_helper/simple_token_auth_helper.rb', line 12 def authenticated_resource_migration "migration add_authentication_token_to_#{plural} \ authentication_token:string{30}:uniq" end |