Class: Stylish::Developer::Config

Inherits:
Struct
  • Object
show all
Defined in:
lib/stylish/developer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#assets_prefixObject

Returns the value of attribute assets_prefix

Returns:

  • (Object)

    the current value of assets_prefix



3
4
5
# File 'lib/stylish/developer/config.rb', line 3

def assets_prefix
  @assets_prefix
end

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



3
4
5
# File 'lib/stylish/developer/config.rb', line 3

def base
  @base
end

#environmentObject

Returns the value of attribute environment

Returns:

  • (Object)

    the current value of environment



3
4
5
# File 'lib/stylish/developer/config.rb', line 3

def environment
  @environment
end

#library_rootObject

Returns the value of attribute library_root

Returns:

  • (Object)

    the current value of library_root



3
4
5
# File 'lib/stylish/developer/config.rb', line 3

def library_root
  @library_root
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



3
4
5
# File 'lib/stylish/developer/config.rb', line 3

def root
  @root
end

Instance Method Details

#asset_prefixObject



8
9
10
# File 'lib/stylish/developer/config.rb', line 8

def asset_prefix
  assets_prefix || "/assets"
end

#base_urlObject



4
5
6
# File 'lib/stylish/developer/config.rb', line 4

def base_url
  base || "/stylish"
end

#libraryObject



12
13
14
15
16
# File 'lib/stylish/developer/config.rb', line 12

def library
  lib_root = library_root || Pathname(Dir.pwd).join("library")
  Stylish::Library.load_from_disk(lib_root)
  Stylish::Library.loaded.first
end