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.



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

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.



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

def author
  @author
end

#javascriptsObject (readonly)

Returns the value of attribute javascripts.



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

def javascripts
  @javascripts
end

#stylesheetsObject (readonly)

Returns the value of attribute stylesheets.



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

def stylesheets
  @stylesheets
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

Instance Method Details

#get_bindingObject



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

def get_binding
  binding()
end

#javascript_tagsObject



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

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

#stylesheet_tagsObject



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

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