Class: Construqt::Flavour::Ciscian::MultiValueVerb
- Inherits:
-
Object
- Object
- Construqt::Flavour::Ciscian::MultiValueVerb
- Defined in:
- lib/construqt/flavour/ciscian/ciscian.rb
Instance Attribute Summary collapse
-
#section ⇒ Object
Returns the value of attribute section.
-
#values ⇒ Object
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
- #add(value) ⇒ Object
-
#initialize(section) ⇒ MultiValueVerb
constructor
A new instance of MultiValueVerb.
- #no ⇒ Object
- #serialize ⇒ Object
Constructor Details
#initialize(section) ⇒ MultiValueVerb
Returns a new instance of MultiValueVerb.
261 262 263 264 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 261 def initialize(section) self.section=section self.values = [] end |
Instance Attribute Details
#section ⇒ Object
Returns the value of attribute section.
260 261 262 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 260 def section @section end |
#values ⇒ Object
Returns the value of attribute values.
260 261 262 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 260 def values @values end |
Class Method Details
.compare(nu, old) ⇒ Object
284 285 286 287 288 289 290 291 292 293 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 284 def self.compare(nu, old) return [nu] unless old return [old.no] unless nu throw "classes must match #{nu.class.name} != #{old.class.name}" unless nu.class == old.class if (nu.serialize==old.serialize) [nil] else [nu] end end |
Instance Method Details
#add(value) ⇒ Object
266 267 268 269 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 266 def add(value) self.values << value self end |
#no ⇒ Object
271 272 273 274 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 271 def no @no="no " self end |
#serialize ⇒ Object
276 277 278 279 280 281 282 |
# File 'lib/construqt/flavour/ciscian/ciscian.rb', line 276 def serialize if @no ["#{@no}#{section}"] else ["#{section} #{values.join(",")}"] end end |