Class: Spritely::Options

Inherits:
Struct
  • Object
show all
Defined in:
lib/spritely/options.rb

Constant Summary collapse

GLOBAL_OPTIONS =
[:spacing, :position]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hashObject

Returns the value of attribute hash



6
7
8
# File 'lib/spritely/options.rb', line 6

def hash
  @hash
end

Instance Method Details

#[](key) ⇒ Object



17
18
19
# File 'lib/spritely/options.rb', line 17

def [](key)
  options[key] || global_options
end

#cache_keyObject



9
10
11
# File 'lib/spritely/options.rb', line 9

def cache_key
  stripped_hash.to_s
end

#inspectObject



13
14
15
# File 'lib/spritely/options.rb', line 13

def inspect
  "#<Spritely::Options global_options=#{global_options} options=#{options}>"
end