Skip to content

Commit

Permalink
catch case where no custom tags are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jfitisoff committed Jun 22, 2018
1 parent 5e35d13 commit d3ffd10
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions lib/insite/insite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ def initialize(base_url, **hsh)

# Build generic components for custom tags, which are defined
# using Site.custom_tags.
self.class.custom_tags.each do |tag|
# TODO: Ditch string interpolation.
self.class.class_eval %Q{
class #{tag.underscore.camelize} < Component
select_by tag_name: "#{tag}"
end
}
if self.class.custom_tags
self.class.custom_tags.each do |tag|
# TODO: Ditch string interpolation.
self.class.class_eval %Q{
class #{tag.underscore.camelize} < Component
select_by tag_name: "#{tag}"
end
}
end
end

# Set up accessor methods for each page and page checking methods..
Expand Down

0 comments on commit d3ffd10

Please sign in to comment.