Module: Dizby::BasicProtocol::ClassMethods
- Defined in:
- lib/dizby/protocol/basic.rb
Instance Attribute Summary collapse
-
#scheme
Returns the value of attribute scheme.
Instance Method Summary collapse
Instance Attribute Details
#scheme
Returns the value of attribute scheme.
14 15 16 |
# File 'lib/dizby/protocol/basic.rb', line 14 def scheme @scheme end |
Instance Method Details
#get_refinement(type)
16 17 18 19 20 |
# File 'lib/dizby/protocol/basic.rb', line 16 def get_refinement(type) instance_variable_get(:"@#{type}_refined") rescue NameError nil end |
#refine(type, regex, &block) (protected)
26 27 28 29 |
# File 'lib/dizby/protocol/basic.rb', line 26 def refine(type, regex, &block) refined = RefinedProtocol.new(regex, &block) instance_variable_set(:"@#{type}_refined", refined) end |