Skip to content

Commit

Permalink
RuboCop fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed May 19, 2017
1 parent aa590ca commit 8c0b603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion library/cwm/src/lib/cwm/tree.rb
Expand Up @@ -32,6 +32,7 @@ def ui_term
end
end

# A tree of nested {TreeItem}s
class Tree < CustomWidget
# @return [Enumerable<TreeItem>]
attr_reader :items
Expand All @@ -43,7 +44,7 @@ def initialize(* items, label:)
end

def contents
item_terms = items.map { |i| i.ui_term }
item_terms = items.map(&:ui_term)
Tree(Id(widget_id), Opt(:notify), label, item_terms)
end

Expand Down
4 changes: 1 addition & 3 deletions library/cwm/src/lib/cwm/tree_pager.rb
Expand Up @@ -39,9 +39,7 @@ def contents
protected

def page_for_id(id)
if id == @tree.widget_id
id = @tree.value
end
id = @tree.value if id == @tree.widget_id
super(id)
end

Expand Down

0 comments on commit 8c0b603

Please sign in to comment.