Skip to content

Commit

Permalink
shoes#945 Get rid of useless access modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
azranel committed Feb 7, 2015
1 parent 9553ca2 commit d3956bc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
25 changes: 12 additions & 13 deletions shoes-core/lib/shoes/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,13 @@ def method_missing(name, *args, &blk)
end
end

private

def inspect_details
" \"#{@__app__.app_title}\""
end

def to_s_details
inspect_details
end

public

DELEGATE_BLACKLIST = [:parent, :app]

# class definitions are evaluated top to bottom, want to have all of them
# so define at bottom
DELEGATE_METHODS = ((Shoes::App.public_instance_methods(false) +
Shoes::DSL.public_instance_methods) - DELEGATE_BLACKLIST).freeze
Shoes::DSL.public_instance_methods) -
DELEGATE_BLACKLIST).freeze

def self.subscribe_to_dsl_methods(klazz)
klazz.extend Forwardable unless klazz.is_a? Forwardable
Expand All @@ -134,5 +123,15 @@ def self.new_dsl_method(name, &blk)
define_method name, blk
@method_subscribers.each { |klazz| klazz.def_delegator :app, name }
end

private

def inspect_details
" \"#{@__app__.app_title}\""
end

def to_s_details
inspect_details
end
end
end
4 changes: 2 additions & 2 deletions shoes-core/lib/shoes/dimension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ def extent_in_parent
#
# To get our extent respecting the parent's margins, it's our absolute
# start, minus parent's element end (so we don't blow past the margin)
extent_in_parent = parent.element_end - self.absolute_start - PIXEL_COUNTING_ADJUSTMENT
parent.element_end - self.absolute_start - PIXEL_COUNTING_ADJUSTMENT
else
# If we hit this, then the extent in parent isn't available and will be
# ignored by the min call below
extent_in_parent = Float::INFINITY
Float::INFINITY
end
end

Expand Down

0 comments on commit d3956bc

Please sign in to comment.