Skip to content

Feature/convertor#14

Open
Hitin wants to merge 22 commits intoulstu:masterfrom
Hitin:feature/convertor
Open

Feature/convertor#14
Hitin wants to merge 22 commits intoulstu:masterfrom
Hitin:feature/convertor

Conversation

@Hitin
Copy link
Copy Markdown

@Hitin Hitin commented Mar 13, 2020

Первая версия рабочей программы.

@@ -0,0 +1,19 @@
module AtomConverter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Видимо, код через rubocop не прогонялся..

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Или он реально пустую строчку вставляет?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не прогонялся через рубокоп, в данной реализации было важно сам функционал) учту при дальнейшей разработке.

data
end

def self.can?(data)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не понятно, что can? Надо бы по-яснее метод описывать.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С названиями у меня всегда проблема))

def self.can?(input)
uri = URI.parse(input)
%w( http https ).include?(uri.scheme)
rescue URI::BadURIError
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rescue URI::BadURIError, URI::InvalidURIError
попробуй так сделать

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants