Class: Gamefic::Sdk::Platform::Web::AppConfig::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/gamefic-sdk/platform/web/app_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, javascripts, stylesheets) ⇒ Data

Returns a new instance of Data.



59
60
61
62
63
64
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 59

def initialize config, javascripts, stylesheets
  @author = config.author
  @title = config.title
  @javascripts = javascripts
  @stylesheets = stylesheets
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



58
59
60
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 58

def author
  @author
end

#javascriptsObject (readonly)

Returns the value of attribute javascripts.



58
59
60
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 58

def javascripts
  @javascripts
end

#stylesheetsObject (readonly)

Returns the value of attribute stylesheets.



58
59
60
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 58

def stylesheets
  @stylesheets
end

#titleObject (readonly)

Returns the value of attribute title.



58
59
60
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 58

def title
  @title
end

Instance Method Details

#get_bindingObject



79
80
81
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 79

def get_binding
  binding()
end

#javascript_tagsObject



65
66
67
68
69
70
71
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 65

def javascript_tags
  result = ""
  javascripts.each { |js|
    result += "<script type=\"text/javascript\" src=\"#{js}\"></script>"
  }
  result
end

#stylesheet_tagsObject



72
73
74
75
76
77
78
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 72

def stylesheet_tags
  result = ""
  stylesheets.each { |css|
    result += "<link rel=\"stylesheet\" type=\"text/css\" href=\"#{css}\" />"
  }
  result
end