Class: Gamefic::Sdk::Platform::Web::AppConfig::Data
- Inherits:
-
Object
- Object
- Gamefic::Sdk::Platform::Web::AppConfig::Data
- Defined in:
- lib/gamefic-sdk/platform/web/app_config.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#javascripts ⇒ Object
readonly
Returns the value of attribute javascripts.
-
#stylesheets ⇒ Object
readonly
Returns the value of attribute stylesheets.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize(config, javascripts, stylesheets) ⇒ Data
constructor
A new instance of Data.
- #javascript_tags ⇒ Object
- #stylesheet_tags ⇒ Object
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. @title = config.title @javascripts = javascripts @stylesheets = stylesheets end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
58 59 60 |
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 58 def @author end |
#javascripts ⇒ Object (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 |
#stylesheets ⇒ Object (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 |
#title ⇒ Object (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_binding ⇒ Object
79 80 81 |
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 79 def get_binding binding() end |
#javascript_tags ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 65 def result = "" javascripts.each { |js| result += "<script type=\"text/javascript\" src=\"#{js}\"></script>" } result end |
#stylesheet_tags ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/gamefic-sdk/platform/web/app_config.rb', line 72 def result = "" stylesheets.each { |css| result += "<link rel=\"stylesheet\" type=\"text/css\" href=\"#{css}\" />" } result end |