class JsonVoorhees::AppMakeAuthorizationsGenerator

Public Instance Methods

sprint() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 9
def sprint
     template "auth_file.rb.erb", "gems/authorization/lib/authorization/#{module_snake}/v#{api_version}/#{resource_singular}.rb"
     require_authfile
end

Private Instance Methods

module_camel() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 32
def module_camel
     module_name.camelize
end
module_snake() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 36
def module_snake
     module_name.underscore.downcase
end
require_authfile() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 16
    def require_authfile
prepend_file 'gems/authorization/lib/authorization.rb', "require \'authorization/#{module_snake}/v#{api_version}/#{resource_singular}\'\n"
    end
resource_camel() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 28
def resource_camel
     resource_name.camelize.singularize
end
resource_plural() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 24
def resource_plural
     resource_name.underscore.pluralize
end
resource_singular() click to toggle source
# File lib/generators/json_voorhees/app_make_authorizations/app_make_authorizations_generator.rb, line 20
def resource_singular
     resource_name.underscore.singularize
end