Module: Scruffy::Helpers::PointContainer::Hash_ext
- Defined in:
- lib/scruffy/helpers/point_container.rb
Instance Method Summary collapse
Instance Method Details
#each_point(&block) ⇒ Object
83 84 85 |
# File 'lib/scruffy/helpers/point_container.rb', line 83 def each_point(&block) keys.sort.each{|k|block.call(k,self[k])} end |
#inject(memo) ⇒ Object
87 88 89 90 91 92 |
# File 'lib/scruffy/helpers/point_container.rb', line 87 def inject memo keys.sort.each do |k| memo = yield memo, self[k] end memo end |
#is_coordinate_list? ⇒ Boolean
79 80 81 |
# File 'lib/scruffy/helpers/point_container.rb', line 79 def is_coordinate_list? true end |
#size ⇒ Object
94 95 96 |
# File 'lib/scruffy/helpers/point_container.rb', line 94 def size maximum_key - minimum_key + 1 end |