SOLID OOP development – the interface segregation principle
As we make our way through the SOLID development journey, it's time we turned to the I in SOLID, which represents the Interface Segregation Principle (ISP):

The ISP definition
As with several of the other SOLID design concepts, this represents a scary name for an important topic. A dead simple definition of the ISP is that code should not be forced to depend on methods that it doesn't use.
If this is a bit fuzzy, don't worry, I'm going to walk you through a code example that clears it up.
Believe it or not, this is one of the easier SOLID concepts to understand and work with.
The ISP code example
Let's start by taking a look at a program that manages a blog:
class Blog
def edit_post
puts "Post edited"
end
def delete_post
puts "Post removed"
end
def create_post
puts "Post created"
end
end
blog = Blog.new
blog.edit_post
blog.delete_post
blog.create_post Obviously, this program simply prints out some values in each...