Exception: ActiveLdap::LdifInvalid
- Defined in:
- lib/active_ldap/base.rb
Constant Summary
- NEAREST_MARK =
"|@|"
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#ldif ⇒ Object
readonly
Returns the value of attribute ldif.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#nearest ⇒ Object
readonly
Returns the value of attribute nearest.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(ldif, reason = nil, line = nil, column = nil) ⇒ LdifInvalid
constructor
A new instance of LdifInvalid.
Constructor Details
#initialize(ldif, reason = nil, line = nil, column = nil) ⇒ LdifInvalid
Returns a new instance of LdifInvalid
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/active_ldap/base.rb', line 156 def initialize(ldif, reason=nil, line=nil, column=nil) @ldif = ldif @reason = reason @line = line @column = column @nearest = nil if @reason = _("invalid LDIF: %s:") % @reason else = _("invalid LDIF:") end if @line and @column @nearest = detect_nearest(@line, @column) snippet = generate_snippet << "\n#{snippet}\n" end super("#{}\n#{numbered_ldif}") end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column
155 156 157 |
# File 'lib/active_ldap/base.rb', line 155 def column @column end |
#ldif ⇒ Object (readonly)
Returns the value of attribute ldif
155 156 157 |
# File 'lib/active_ldap/base.rb', line 155 def ldif @ldif end |
#line ⇒ Object (readonly)
Returns the value of attribute line
155 156 157 |
# File 'lib/active_ldap/base.rb', line 155 def line @line end |
#nearest ⇒ Object (readonly)
Returns the value of attribute nearest
155 156 157 |
# File 'lib/active_ldap/base.rb', line 155 def nearest @nearest end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
155 156 157 |
# File 'lib/active_ldap/base.rb', line 155 def reason @reason end |