Class List Method List File List

# Class: WpTheme

Inherits:
  WpItem
  - Object
  - WpItem
  - WpTheme
  show all
Extended by:
  Findable
Includes:
  Versionable, Vulnerable
Defined in:
  lib/common/models/wp_theme.rb,
  lib/common/models/wp_theme/findable.rb,
  lib/common/models/wp_theme/vulnerable.rb,
  lib/common/models/wp_theme/versionable.rb

## Defined Under Namespace

Modules: Findable, Versionable, Vulnerable

## Instance Attribute Summary (collapse)

- - (String) style_url

  The url to the theme stylesheet.

### Attributes inherited from WpItem

#found_from, #name, #path, #version, #wp_content_dir, #wp_plugins_dir

### Attributes included from WpItem::Vulnerable

#vulns_file, #vulns_xpath

## Instance Method Summary (collapse)

- - (Object) allowed_options
- - (void) forge_uri(target_base_uri)

  Sets the @uri.

### Methods included from Findable

find, find_from_css_link, find_from_wooframework

### Methods included from Vulnerable

#vulns_file, #vulns_xpath

### Methods included from Versionable

#version

### Methods inherited from WpItem

#<=>, #==, #===, #initialize, #set_options, #uri, #url

### Methods included from WpItem::Output

#output

### Methods included from WpItem::Infos

#changelog_url, #error_log_url, #has_changelog?, #has_directory_listing?, #has_error_log?, #has_readme?, #readme_url, #url_is_200?

### Methods included from WpItem::Existable

#exists?, #exists_from_response?

### Methods included from WpItem::Vulnerable

#vulnerabilities, #vulnerable_to?

### Methods included from WpItem::Versionable

#to_s, #version

## Constructor Details

This class inherits a constructor from WpItem

## Instance Attribute Details

### - (`String`) style_url

The url to the theme stylesheet

Returns:

- (`String`) —

  The url to the theme stylesheet

    26
    27
    28
    29
    30
    31
    # File 'lib/common/models/wp_theme.rb', line 26

    def style_url
      unless @style_url
        @style_url = uri.merge('style.css').to_s
      end
      @style_url
    end

## Instance Method Details

### - (`Object`) allowed_options

    14
    # File 'lib/common/models/wp_theme.rb', line 14

    def allowed_options; super << :style_url end

### - (`void`) forge_uri(target_base_uri)

This method returns an undefined value.

Sets the @uri

Parameters:

- target_base_uri (`URI`) —

  The URI of the wordpress blog

    21
    22
    23
    # File 'lib/common/models/wp_theme.rb', line 21

    def forge_uri(target_base_uri)
      @uri = target_base_uri.merge(URI.encode(wp_content_dir + '/themes/' + name + '/'))
    end