Class: Line::Options
- Inherits:
-
Object
- Object
- Line::Options
- Defined in:
- lib/line/options.rb
Instance Attribute Summary collapse
-
#buffer_size ⇒ Object
Returns the value of attribute buffer_size.
-
#chomp ⇒ Object
(also: #chomp?)
Returns the value of attribute chomp.
-
#debug ⇒ Object
(also: #debug?)
Returns the value of attribute debug.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#errstream ⇒ Object
Returns the value of attribute errstream.
-
#force ⇒ Object
(also: #force?)
Returns the value of attribute force.
-
#help_screen ⇒ Object
Returns the value of attribute help_screen.
-
#indexes ⇒ Object
Returns the value of attribute indexes.
-
#instream ⇒ Object
Returns the value of attribute instream.
-
#line_matcher ⇒ Object
Returns the value of attribute line_matcher.
-
#line_numbers ⇒ Object
(also: #line_numbers?)
Returns the value of attribute line_numbers.
-
#outstream ⇒ Object
Returns the value of attribute outstream.
-
#show_help ⇒ Object
(also: #show_help?)
Returns the value of attribute show_help.
-
#strip ⇒ Object
(also: #strip?)
Returns the value of attribute strip.
Instance Method Summary collapse
-
#initialize(attributes = {}) {|_self| ... } ⇒ Options
constructor
A new instance of Options.
- #update(attributes) ⇒ Object
Constructor Details
#initialize(attributes = {}) {|_self| ... } ⇒ Options
Returns a new instance of Options.
6 7 8 9 |
# File 'lib/line/options.rb', line 6 def initialize(attributes={}) update attributes yield self if block_given? end |
Instance Attribute Details
#buffer_size ⇒ Object
Returns the value of attribute buffer_size.
4 5 6 |
# File 'lib/line/options.rb', line 4 def buffer_size @buffer_size end |
#chomp ⇒ Object Also known as: chomp?
Returns the value of attribute chomp.
3 4 5 |
# File 'lib/line/options.rb', line 3 def chomp @chomp end |
#debug ⇒ Object Also known as: debug?
Returns the value of attribute debug.
4 5 6 |
# File 'lib/line/options.rb', line 4 def debug @debug end |
#errors ⇒ Object
Returns the value of attribute errors.
3 4 5 |
# File 'lib/line/options.rb', line 3 def errors @errors end |
#errstream ⇒ Object
Returns the value of attribute errstream.
4 5 6 |
# File 'lib/line/options.rb', line 4 def errstream @errstream end |
#force ⇒ Object Also known as: force?
Returns the value of attribute force.
3 4 5 |
# File 'lib/line/options.rb', line 3 def force @force end |
#help_screen ⇒ Object
Returns the value of attribute help_screen.
4 5 6 |
# File 'lib/line/options.rb', line 4 def help_screen @help_screen end |
#indexes ⇒ Object
Returns the value of attribute indexes.
3 4 5 |
# File 'lib/line/options.rb', line 3 def indexes @indexes end |
#instream ⇒ Object
Returns the value of attribute instream.
4 5 6 |
# File 'lib/line/options.rb', line 4 def instream @instream end |
#line_matcher ⇒ Object
Returns the value of attribute line_matcher.
3 4 5 |
# File 'lib/line/options.rb', line 3 def line_matcher @line_matcher end |
#line_numbers ⇒ Object Also known as: line_numbers?
Returns the value of attribute line_numbers.
3 4 5 |
# File 'lib/line/options.rb', line 3 def line_numbers @line_numbers end |
#outstream ⇒ Object
Returns the value of attribute outstream.
4 5 6 |
# File 'lib/line/options.rb', line 4 def outstream @outstream end |
#show_help ⇒ Object Also known as: show_help?
Returns the value of attribute show_help.
3 4 5 |
# File 'lib/line/options.rb', line 3 def show_help @show_help end |
#strip ⇒ Object Also known as: strip?
Returns the value of attribute strip.
3 4 5 |
# File 'lib/line/options.rb', line 3 def strip @strip end |
Instance Method Details
#update(attributes) ⇒ Object
11 12 13 14 |
# File 'lib/line/options.rb', line 11 def update(attributes) attributes.each { |attribute, value| __send__ "#{attribute}=", value } self end |