Module: WpTheme::Info

Included in:
WpTheme
Defined in:
lib/common/models/wp_theme/info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#theme_authorObject (readonly)

Returns the value of attribute theme_author


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_author
  @theme_author
end

#theme_author_uriObject (readonly)

Returns the value of attribute theme_author_uri


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_author_uri
  @theme_author_uri
end

#theme_descriptionObject (readonly)

Returns the value of attribute theme_description


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_description
  @theme_description
end

#theme_licenseObject (readonly)

Returns the value of attribute theme_license


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_license
  @theme_license
end

#theme_license_uriObject (readonly)

Returns the value of attribute theme_license_uri


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_license_uri
  @theme_license_uri
end

#theme_nameObject (readonly)

Returns the value of attribute theme_name


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_name
  @theme_name
end

#theme_tagsObject (readonly)

Returns the value of attribute theme_tags


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_tags
  @theme_tags
end

#theme_templateObject (readonly)

Returns the value of attribute theme_template


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_template
  @theme_template
end

#theme_text_domainObject (readonly)

Returns the value of attribute theme_text_domain


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_text_domain
  @theme_text_domain
end

#theme_uriObject (readonly)

Returns the value of attribute theme_uri


6
7
8
# File 'lib/common/models/wp_theme/info.rb', line 6

def theme_uri
  @theme_uri
end

Instance Method Details

#parse_styleObject


11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/common/models/wp_theme/info.rb', line 11

def parse_style
  style = Browser.get(style_url).body
  @theme_name = parse_style_tag(style, 'Theme Name')
  @theme_uri = parse_style_tag(style, 'Theme URI')
  @theme_description = parse_style_tag(style, 'Description')
  @theme_author = parse_style_tag(style, 'Author')
  @theme_author_uri = parse_style_tag(style, 'Author URI')
  @theme_template = parse_style_tag(style, 'Template')
  @theme_license = parse_style_tag(style, 'License')
  @theme_license_uri = parse_style_tag(style, 'License URI')
  @theme_tags = parse_style_tag(style, 'Tags')
  @theme_text_domain = parse_style_tag(style, 'Text Domain')
end