Skip to content

Commit

Permalink
Inline messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinlaking committed Jul 2, 2015
1 parent b510760 commit 1881312
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lib/vedeu/output/refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ module Refresh
#
# @return [Array]
def all
message = 'Refreshing all interfaces'

Vedeu.timer(message) do
Vedeu.timer('Refreshing all interfaces') do
Vedeu.interfaces.zindexed.each { |model| by_name(model.name) }
end
end
Expand All @@ -36,9 +34,7 @@ def by_focus
# @return [Array|ModelNotFound] A collection of the names of interfaces
# refreshed, or an exception if the group was not found.
def by_group(group_name)
message = "Refreshing group: '#{group_name}'"

Vedeu.timer(message) do
Vedeu.timer("Refreshing group: '#{group_name}'") do
members = Vedeu.groups.find!(group_name).members
interfaces = members.each { |name| Vedeu.interfaces.by_name(name) }
by_zindex = interfaces.sort { |a, b| a.zindex <=> b.zindex }
Expand All @@ -52,9 +48,9 @@ def by_group(group_name)
# named buffer.
# @return [Array|ModelNotFound]
def by_name(name)
message = "Refreshing interface: '#{name}'"

Vedeu.timer(message) { Vedeu.buffers.by_name(name).render }
Vedeu.timer("Refreshing interface: '#{name}'") do
Vedeu.buffers.by_name(name).render
end
end

end # Refresh
Expand Down

0 comments on commit 1881312

Please sign in to comment.