Class: Treely::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/treely/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/treely/configuration.rb', line 5

def initialize
  @style = {
    :dot         => %{\x2e},
    :space       => %{\x20},
    :new_line    => %{\x0a},
    :bar         => %{},
    :indent      => %{    },
    :branch      => %{├── },
    :last_branch => %{└── }
  }
end

Instance Attribute Details

#styleObject (readonly)

Returns the value of attribute style.



3
4
5
# File 'lib/treely/configuration.rb', line 3

def style
  @style
end

Instance Method Details

#transform_style!(&block) ⇒ Object



17
18
19
# File 'lib/treely/configuration.rb', line 17

def transform_style!(&block)
  @style.transform_values!(&block)
end