Class: Bhf::Settings::Platform

Inherits:
Object
  • Object
show all
Defined in:
lib/bhf/settings/platform.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(settings_hash, page_name, settings_base) ⇒ Platform

Returns a new instance of Platform.



7
8
9
10
11
12
13
14
15
16
# File 'lib/bhf/settings/platform.rb', line 7

def initialize(settings_hash, page_name, settings_base)
  if settings_hash.is_a?(String)
    settings_hash = {settings_hash => nil}
  end
  @name = settings_hash.keys[0]
  @hash = settings_hash.values[0] || {}

  @settings_base = settings_base
  @page_name = page_name
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/bhf/settings/platform.rb', line 5

def data
  @data
end

#hashObject (readonly)

Returns the value of attribute hash.



5
6
7
# File 'lib/bhf/settings/platform.rb', line 5

def hash
  @hash
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/bhf/settings/platform.rb', line 5

def name
  @name
end

#page_nameObject (readonly)

Returns the value of attribute page_name.



5
6
7
# File 'lib/bhf/settings/platform.rb', line 5

def page_name
  @page_name
end

#settings_baseObject (readonly)

Returns the value of attribute settings_base.



5
6
7
# File 'lib/bhf/settings/platform.rb', line 5

def settings_base
  @settings_base
end