Sha256: 4b3a59c1c45761a2a7ec9e9f31671fafa209291be79549e2a606e4091588f600
Contents?: true
Size: 806 Bytes
Versions: 10
Compression:
Stored size: 806 Bytes
Contents
module Animoto module Visual # Setter for spotlighting, which instructs the director to give special attention # to this visual when directing. # # @param [Boolean] bool true if this visual should receive special attention def spotlit= bool @spotlit = bool end # Returns true if this visual is spotlit. # # @return [Boolean] whether or not this visual is spotlit def spotlit? @spotlit end # Returns a representation of this Visual as a Hash # # @return [Hash] this Visual as a Hash def to_hash hash = super rescue {} hash['spotlit'] = spotlit? unless @spotlit.nil? hash['type'] = self.class.name.split('::').last.gsub(/(^)?([A-Z])/) { "#{'_' unless $1}#{$2.downcase}" } hash end end end
Version data entries
10 entries across 10 versions & 1 rubygems