lolcatbois / ignore-it

A tool written in ruby which helps in fetching and creating .gitignore files. Currently .gitignore files will be fetched from https://gitignore.io or from local user-made templates.
MIT License
1 stars 0 forks source link

Extract creator "Create gitignore" logic into own function #42

Closed NINNiT closed 3 years ago

NINNiT commented 3 years ago
def create_own_ignore
  contents = <fetch file content>
  create_file(contents)
end

def create_api_ignore
  contents = <fetch api content>
  create_file(contents)
end

def create_file
<creation/append logic>
...
end