Class: Megam::Mixins::Operations

Inherits:
Object
  • Object
show all
Includes:
Nilavu::MegamAttributes
Defined in:
lib/megam/mixins/components.rb

Constant Summary collapse

ATTRIBUTES =
[
    :type,
    :desc,
    :prop,
:status]
CI =
'CI'.freeze
CI_DESCRIPTON =
'always up to date code. sweet.'
NOTBOUND =
"notbound".freeze
BIND =
'bind'.freeze
BIND_DESCRIPTON =
'bind. sweet.'

Constants included from Nilavu::MegamAttributes

Nilavu::MegamAttributes::KEY, Nilavu::MegamAttributes::VALUE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Nilavu::MegamAttributes

#set_attributes, #to_hash

Constructor Details

#initialize(params, type, desc) ⇒ Operations

Returns a new instance of Operations.



130
131
132
133
134
# File 'lib/megam/mixins/components.rb', line 130

def initialize(params, type, desc)
    @type = type
    @desc = desc
    @prop = prop(params)
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc.



112
113
114
# File 'lib/megam/mixins/components.rb', line 112

def desc
  @desc
end

#prop(params) ⇒ Object (readonly)

Key_name mismatch. Key_name is to be changed.



149
150
151
# File 'lib/megam/mixins/components.rb', line 149

def prop
  @prop
end

#statusObject (readonly)

Returns the value of attribute status.



112
113
114
# File 'lib/megam/mixins/components.rb', line 112

def status
  @status
end

#typeObject (readonly)

Returns the value of attribute type.



112
113
114
# File 'lib/megam/mixins/components.rb', line 112

def type
  @type
end

Instance Method Details

#attributesObject



120
121
122
# File 'lib/megam/mixins/components.rb', line 120

def attributes
    ATTRIBUTES
end

#tohashObject



140
141
142
143
144
145
146
# File 'lib/megam/mixins/components.rb', line 140

def tohash
    {   operation_type: @type,
        description: @desc,
        properties: @prop,
        status: NOTBOUND
    }
end