Sha256: 79460e2f3573607d5419be50f75d2ba14cb69cb430efba3550ba36c65b4a95c2
Contents?: true
Size: 816 Bytes
Versions: 2
Compression:
Stored size: 816 Bytes
Contents
module Kooaba class Item attr_accessor :uuid attr_accessor :images_sha1 attr_accessor :title attr_accessor :metadata attr_accessor :enabled attr_accessor :reference_id attr_accessor :image_files def initialize(options = {}) raise TypeError, "enabled should be true or false" unless [nil, true, false].include? options[:enabled] if !options[:image_files].instance_of?(Array) && options[:image_files] != nil raise TypeError, "image_files must be a list of paths (Array of Strings)" end @title = options[:title] @metadata = options[:metadata] @enabled = options[:enabled] == nil ? true : options[:enabled] @reference_id = options[:reference_id] @image_files = options[:image_files] || [] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kooaba-0.0.5 | lib/kooaba/item.rb |
kooaba-0.0.4 | lib/kooaba/item.rb |