Class: CyberarmEngine::Style

Inherits:
Object
  • Object
show all
Defined in:
lib/cyberarm_engine/ui/style.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Style

Returns a new instance of Style.



46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/cyberarm_engine/ui/style.rb', line 46

def initialize(hash = {})
  h = hash
  # h = Marshal.load(Marshal.dump(hash))


  h[:default] = {}

  h.each do |key, value|
    next if value.is_a?(Hash)

    h[:default][key] = value
  end

  @hash = h
end

Instance Attribute Details

#hashObject (readonly)

Returns the value of attribute hash.



20
21
22
# File 'lib/cyberarm_engine/ui/style.rb', line 20

def hash
  @hash
end