lib/vedeu/borders/dsl.rb in vedeu-0.6.8 vs lib/vedeu/borders/dsl.rb in vedeu-0.6.9
- old
+ new
@@ -14,12 +14,12 @@
#
# Vedeu.border 'some_interface' do
# # ...
# end
#
- # @param name [String] The name of the interface or view to which this
- # border belongs.
+ # @param name [String] The name of the interface or view to
+ # which this border belongs.
# @param block [Proc]
# @raise [Vedeu::Error::InvalidSyntax]
# The required block was not given.
# @return [Vedeu::Borders::Border]
def self.border(name, &block)
@@ -36,36 +36,36 @@
def initialize(model, client = nil)
@model = model
@client = client
end
- # Set the character to be used to draw the bottom left corner of the
- # border.
+ # Set the character to be used to draw the bottom left corner of
+ # the border.
#
# Vedeu.border 'border_demo' do
# bottom_left '+'
# # ... some code
# end
#
- # @param char [String] Character to be used as the bottom left border
- # character.
+ # @param char [String] Character to be used as the bottom left
+ # border character.
# @return [String]
def bottom_left(char)
model.bottom_left = char
end
alias_method :bottom_left=, :bottom_left
- # Set the character to be used to draw the bottom right corner of the
- # border.
+ # Set the character to be used to draw the bottom right corner
+ # of the border.
#
# Vedeu.border 'border_demo' do
# bottom_right '+'
# # ... some code
# end
#
- # @param char [String] Character to be used as the bottom right border
- # character.
+ # @param char [String] Character to be used as the bottom right
+ # border character.
# @return [String]
def bottom_right(char)
model.bottom_right = char
end
alias_method :bottom_right=, :bottom_right
@@ -88,11 +88,12 @@
model.enabled
end
# Enable the border:
- # (Borders are enabled by default when defined for an interface).
+ # (Borders are enabled by default when defined for an
+ # interface).
#
# Vedeu.border 'border_demo' do
# enable!
# # ... some code
# end
@@ -107,19 +108,20 @@
show_top!
model.enabled
end
- # Set the character to be used to draw a horizontal part of the border.
+ # Set the character to be used to draw a horizontal part of the
+ # border.
#
# Vedeu.border 'border_demo' do
# horizontal '-'
# # ... some code
# end
#
- # @param char [String] Character to be used as the horizontal border
- # character.
+ # @param char [String] Character to be used as the horizontal
+ # border character.
# @return [String]
def horizontal(char)
model.horizontal = char
end
alias_method :horizontal=, :horizontal
@@ -132,12 +134,12 @@
# hide_bottom! # or...
# show_bottom!
# # ... some code
# end
#
- # @param value [Boolean] All values evaluate as true except nil and
- # false.
+ # @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
@@ -167,12 +169,12 @@
# hide_left! # or...
# show_left!
# # ... some code
# end
#
- # @param value [Boolean] All values evaluate as true except nil and
- # false.
+ # @param value [Boolean] All values evaluate as true except nil
+ # and false.
# @return [Boolean]
def left(value)
boolean = value ? true : false
model.show_left = boolean
@@ -202,12 +204,12 @@
# hide_right! # or...
# show_right!
# # ... some code
# end
#
- # @param value [Boolean] All values evaluate as true except nil and
- # false.
+ # @param value [Boolean] All values evaluate as true except nil
+ # and false.
# @return [Boolean]
def right(value)
boolean = value ? true : false
model.show_right = boolean
@@ -227,11 +229,12 @@
# @see Vedeu::Borders::DSL#right
def show_right!
right(true)
end
- # If you have you are showing a top border, you could add a title.
+ # If you have you are showing a top border, you could add a
+ # title.
#
# Vedeu.border 'border_demo' do
# title 'My Cool Title'
# # ... some code
# end
@@ -245,11 +248,12 @@
def title(value)
model.title = value
end
alias_method :title=, :title
- # If you have you are showing a bottom border, you could add a caption.
+ # If you have you are showing a bottom border, you could add a
+ # caption.
#
# Vedeu.border 'border_demo' do
# caption 'My Cool Caption'
# # ... some code
# end
@@ -273,12 +277,12 @@
# hide_top! # or...
# show_top!
# # ... some code
# end
#
- # @param value [Boolean] All values evaluate as true except nil and
- # false.
+ # @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
@@ -298,48 +302,51 @@
# @see Vedeu::Borders::DSL#top
def show_top!
top(true)
end
- # Set the character to be used to draw the top left corner of the border.
+ # Set the character to be used to draw the top left corner of
+ # the border.
#
# Vedeu.border 'border_demo' do
# top_left '+'
# # ... some code
# end
#
- # @param char [String] Character to be used as the top left border
- # character.
+ # @param char [String] Character to be used as the top left
+ # border character.
# @return [String]
def top_left(char)
model.top_left = char
end
alias_method :top_left=, :top_left
- # Set the character to be used to draw the top right corner of the border.
+ # Set the character to be used to draw the top right corner of
+ # the border.
#
# Vedeu.border 'border_demo' do
# top_right '+'
# # ... some code
# end
#
- # @param char [String] Character to be used as the top right border
- # character.
+ # @param char [String] Character to be used as the top right
+ # border character.
# @return [String]
def top_right(char)
model.top_right = char
end
alias_method :top_right=, :top_right
- # Set the character to be used to draw a vertical part of the border.
+ # Set the character to be used to draw a vertical part of the
+ # border.
#
# Vedeu.border 'border_demo' do
# vertical '|'
# # ... some code
# end
#
- # @param char [String] Character to be used as the vertical border
- # character.
+ # @param char [String] Character to be used as the vertical
+ # border character.
# @return [String]
def vertical(char)
model.vertical = char
end
alias_method :vertical=, :vertical