lib/vedeu/borders/dsl.rb in vedeu-0.8.6 vs lib/vedeu/borders/dsl.rb in vedeu-0.8.7
- old
+ new
@@ -36,11 +36,11 @@
# @option options style [String|Symbol]
# @return [String]
def bottom_left(char, options = {})
model.bottom_left = Vedeu::Cells::BottomLeft.new(attrs(char, options))
end
- alias_method :bottom_left=, :bottom_left
+ alias bottom_left= bottom_left
# {include:file:docs/dsl/by_method/bottom_right.md}
# @param char [String] Character to be used as the bottom right
# border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -49,11 +49,11 @@
# @option options style [String|Symbol]
# @return [String]
def bottom_right(char, options = {})
model.bottom_right = Vedeu::Cells::BottomRight.new(attrs(char, options))
end
- alias_method :bottom_right=, :bottom_right
+ alias bottom_right= bottom_right
# {include:file:docs/dsl/by_method/disable.md}
# @return [Boolean]
def disable!
model.enabled = false
@@ -63,11 +63,11 @@
hide_right!
hide_top!
model.enabled
end
- alias_method :disabled!, :disable!
+ alias disabled! disable!
# {include:file:docs/dsl/by_method/enable.md}
# @return [Boolean]
def enable!
model.enabled = true
@@ -77,11 +77,11 @@
show_right!
show_top!
model.enabled
end
- alias_method :enabled!, :enable!
+ alias enabled! enable!
# {include:file:docs/dsl/by_method/top_horizontal.md}
# @param char [String] Character to be used as the top
# horizontal border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -89,13 +89,13 @@
# @option options colour [Hash<Symbol => String>]
# @option options style [String|Symbol]
# @return [String]
def top_horizontal(char, options = {})
model.top_horizontal = Vedeu::Cells::TopHorizontal
- .new(attrs(char, options))
+ .new(attrs(char, options))
end
- alias_method :top_horizontal=, :top_horizontal
+ alias top_horizontal= top_horizontal
# {include:file:docs/dsl/by_method/bottom_horizontal.md}
# @param char [String] Character to be used as the bottom
# horizontal border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -103,13 +103,13 @@
# @option options colour [Hash<Symbol => String>]
# @option options style [String|Symbol]
# @return [String]
def bottom_horizontal(char, options = {})
model.bottom_horizontal = Vedeu::Cells::BottomHorizontal
- .new(attrs(char, options))
+ .new(attrs(char, options))
end
- alias_method :bottom_horizontal=, :bottom_horizontal
+ alias bottom_horizontal= bottom_horizontal
# {include:file:docs/dsl/by_method/horizontal.md}
# @param char [String] Character to be used as the horizontal
# border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -118,23 +118,23 @@
# @option options style [String|Symbol]
# @return [String]
def horizontal(char, options = {})
model.horizontal = Vedeu::Cells::Horizontal.new(attrs(char, options))
end
- alias_method :horizontal=, :horizontal
+ alias horizontal= horizontal
# {include:file:docs/dsl/by_method/bottom.md}
# @param value [Boolean] All values evaluate as true except nil
# and false.
# @return [Boolean]
def bottom(value)
boolean = value ? true : false
model.show_bottom = boolean
end
- alias_method :show_bottom, :bottom
- alias_method :bottom=, :bottom
+ alias show_bottom bottom
+ alias bottom= bottom
# Disable the bottom border.
#
# @see Vedeu::Borders::DSL#bottom
def hide_bottom!
@@ -155,12 +155,12 @@
def left(value)
boolean = value ? true : false
model.show_left = boolean
end
- alias_method :show_left, :left
- alias_method :left=, :left
+ alias show_left left
+ alias left= left
# Disable the left border.
#
# @see Vedeu::Borders::DSL#left
def hide_left!
@@ -181,12 +181,12 @@
def right(value)
boolean = value ? true : false
model.show_right = boolean
end
- alias_method :show_right, :right
- alias_method :right=, :right
+ alias show_right right
+ alias right= right
# Disable the right border.
#
# @see Vedeu::Borders::DSL#right
def hide_right!
@@ -205,32 +205,32 @@
# @return [String]
def title(value)
model.title = value
model.title
end
- alias_method :title=, :title
+ alias title= title
# {include:file:docs/dsl/by_method/caption.md}
# @param value [String] The caption.
# @return [String]
def caption(value)
model.caption = value
model.caption
end
- alias_method :caption=, :caption
+ alias caption= caption
# {include:file:docs/dsl/by_method/top.md}
# @param value [Boolean] All values evaluate as true except nil
# and false.
# @return [Boolean]
def top(value)
boolean = value ? true : false
model.show_top = boolean
end
- alias_method :show_top, :top
- alias_method :top=, :top
+ alias show_top top
+ alias top= top
# Disable the top border.
#
# @see Vedeu::Borders::DSL#top
def hide_top!
@@ -253,11 +253,11 @@
# @option options style [String|Symbol]
# @return [String]
def top_left(char, options = {})
model.top_left = Vedeu::Cells::TopLeft.new(attrs(char, options))
end
- alias_method :top_left=, :top_left
+ alias top_left= top_left
# {include:file:docs/dsl/by_method/top_right.md}
# @param char [String] Character to be used as the top right
# border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -266,11 +266,11 @@
# @option options style [String|Symbol]
# @return [String]
def top_right(char, options = {})
model.top_right = Vedeu::Cells::TopRight.new(attrs(char, options))
end
- alias_method :top_right=, :top_right
+ alias top_right= top_right
# {include:file:docs/dsl/by_method/left_vertical.md}
# @param char [String] Character to be used as the left vertical
# border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -278,13 +278,13 @@
# @option options colour [Hash<Symbol => String>]
# @option options style [String|Symbol]
# @return [String]
def left_vertical(char, options = {})
model.left_vertical = Vedeu::Cells::LeftVertical
- .new(attrs(char, options))
+ .new(attrs(char, options))
end
- alias_method :left_vertical=, :left_vertical
+ alias left_vertical= left_vertical
# {include:file:docs/dsl/by_method/right_vertical.md}
# @param char [String] Character to be used as the right
# vertical border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -292,13 +292,13 @@
# @option options colour [Hash<Symbol => String>]
# @option options style [String|Symbol]
# @return [String]
def right_vertical(char, options = {})
model.right_vertical = Vedeu::Cells::RightVertical
- .new(attrs(char, options))
+ .new(attrs(char, options))
end
- alias_method :right_vertical=, :right_vertical
+ alias right_vertical= right_vertical
# {include:file:docs/dsl/by_method/vertical.md}
# @param char [String] Character to be used as the vertical
# border character.
# @param options [Hash<Symbol => Hash<Symbol => String>|String|
@@ -307,10 +307,10 @@
# @option options style [String|Symbol]
# @return [String]
def vertical(char, options = {})
model.vertical = Vedeu::Cells::Vertical.new(attrs(char, options))
end
- alias_method :vertical=, :vertical
+ alias vertical= vertical
private
# @return [Hash<Symbol => void>]
def attrs(value, options)