Class: EditProperty

Inherits:
Struct
  • Object
show all
Defined in:
lib/commands/edit_property.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#authorObject

Returns the value of attribute author

Returns:

  • (Object)

    the current value of author



1
2
3
# File 'lib/commands/edit_property.rb', line 1

def author
  @author
end

#metric_nameObject

Returns the value of attribute metric_name

Returns:

  • (Object)

    the current value of metric_name



1
2
3
# File 'lib/commands/edit_property.rb', line 1

def metric_name
  @metric_name
end

#project_nameObject

Returns the value of attribute project_name

Returns:

  • (Object)

    the current value of project_name



1
2
3
# File 'lib/commands/edit_property.rb', line 1

def project_name
  @project_name
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



1
2
3
# File 'lib/commands/edit_property.rb', line 1

def value
  @value
end

Instance Method Details

#call(project = project, metric_name = metric_name, value = value, author = author) ⇒ Object



2
3
4
# File 'lib/commands/edit_property.rb', line 2

def call project = project, metric_name = metric_name, value = value, author = author
  project.edit_property(metric_name, value, author)
end

#project(project_name = project_name) ⇒ Object



6
7
8
# File 'lib/commands/edit_property.rb', line 6

def project project_name = project_name
  Project.find_by(name: project_name)
end