Module: Floorplanner
- Defined in:
- lib/floorplanner.rb,
lib/floorplanner/asset.rb,
lib/floorplanner/design.rb,
lib/floorplanner/wall3d.rb,
lib/floorplanner/document.rb,
lib/floorplanner/opening3d.rb,
lib/floorplanner/svg_export.rb,
lib/floorplanner/area_builder.rb,
lib/floorplanner/wall_builder.rb,
lib/floorplanner/collada_export.rb
Defined Under Namespace
Modules: ColladaExport, SvgExport, XML
Classes: AreaBuilder, DAE, Design, DesignDocument, Document, Opening3D, Wall3D, WallBuilder
Constant Summary
collapse
- HEX_RE =
"(?i:[a-f\\d])"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
16
17
18
|
# File 'lib/floorplanner.rb', line 16
def self.config
@@config ||= YAML.load_file(File.join(File.dirname(__FILE__),'config.yml'))
end
|
.config=(yaml) ⇒ Object
20
21
22
|
# File 'lib/floorplanner.rb', line 20
def self.config= yaml
@@config = yaml
end
|
.read_color(hexstring) ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/floorplanner.rb', line 26
def self.read_color hexstring
if hexstring =~ /\A#((?:#{HEX_RE}{2,2}){3,4})\z/
return [*$1.scan(/.{2,2}/).collect {|value| value.hex / 255.0}]
else
return [1,1,1]
end
end
|