Skip to content

Instantly share code, notes, and snippets.

View practicingruby's full-sized avatar

Gregory Brown practicingruby

View GitHub Profile
acc += (e.is_a?(Hash) && e.has_key?(:colspan)) ? e[:colspan] : 1
cell_text = cell.is_a?(Hash) ? cell[:text] : cell.to_s
if cell.is_a?(Hash) && cell[:colspan]
text = e.is_a?(Hash) ? e[:text] : e.to_s
width = if e.is_a?(Hash) && e.has_key?(:colspan)
IMAGE_TYPES = %w( image/jpeg image/png image/pjpeg image/x-png image/gif )
validates_attachment_content_type :image, :content_type => IMAGE_TYPES
module RAAWS
ONE_NECESSARY_SEARCH_PARAM =%w<
Actor Artist AudienceRating Author
Brand BrowseNode Composer Conductor CityDirector
Keywords Manufacturer MusicLabel Neighborhood
Orchestra Power Publisher TextStream Title>
class ItemOperation < Operation
def self.lookup(item_id, index=nil, &block)
# COMMUNITY CHALLENGE
#
# How would you test this Quiz#problem method? No mocks/stubs allowed.
#
# (Here's @seacreature's take)
class Quiz
def initialize(input = STDIN, output = STDOUT)
@input = input
@output = output
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.