Class: Caml::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/caml/caml.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Option

Returns a new instance of Option.



81
82
83
84
85
86
87
# File 'lib/caml/caml.rb', line 81

def initialize(options = {})
  @name = options['name']
  @type = options['type']
  @desc = options['desc']
  @aliases = options['aliases']
  @execute = options['execute']
end

Instance Attribute Details

#aliasesObject (readonly)

Returns the value of attribute aliases.



79
80
81
# File 'lib/caml/caml.rb', line 79

def aliases
  @aliases
end

#descObject (readonly)

Returns the value of attribute desc.



79
80
81
# File 'lib/caml/caml.rb', line 79

def desc
  @desc
end

#executeObject (readonly)

Returns the value of attribute execute.



79
80
81
# File 'lib/caml/caml.rb', line 79

def execute
  @execute
end

#nameObject (readonly)

Returns the value of attribute name.



79
80
81
# File 'lib/caml/caml.rb', line 79

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



79
80
81
# File 'lib/caml/caml.rb', line 79

def type
  @type
end

Instance Method Details

#to_sObject



89
90
91
# File 'lib/caml/caml.rb', line 89

def to_s
  "option :#{name}, type: :#{type}, desc: '#{desc}'"
end